Milan Oparnica wrote:
> Milan Oparnica wrote:
>> It's simply to complicated to return recordsets through server-side
>> stored procedures. They are obviously designed to do complex data
>> manipulation, returning few output variables informing the caller
>> about final results. Returning records through sets of
>> user-defined-types is memory and performance waste (please see my
>> previous post as reply to Steve for more details).
I'm not convinced it's always a win one way or another.
>> Plus it's hard to
>> maintain and make improvements to such a system. I hate to see 800
>> user types made for every query we made as stored procedure.
> Is this topic completely out of scope in Postgre ?
> If I'm missing something too obvious or too important, please let me
> know what.
You still haven't said what's "too complicated" about defining a function:
CREATE FUNCTION users_at_dotcom(text) RETURNS SETOF users AS $$
SELECT * FROM users WHERE email LIKE '%@' || $1 || '.com';
$$ LANGUAGE SQL;
SELECT * FROM users_at_dotcom('archonet');
uid | uname | email
1 | richard | richardh(at)archonet(dot)com
In response to
pgsql-sql by date
|Next:||From: Florian Weimer||Date: 2008-07-17 10:23:28|
|Subject: Generating table rows from arrays|
|Previous:||From: Pavel Stehule||Date: 2008-07-17 06:13:41|
|Subject: Re: PERSISTANT PREPARE (another point of view)|