Re: RETURN QUERY in PL/PgSQL?

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Neil Conway" <neilc(at)samurai(dot)com>, "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, andrew(at)dunslane(dot)net, josh(at)agliodbs(dot)com
Subject: Re: RETURN QUERY in PL/PgSQL?
Date: 2007-05-04 07:43:00
Message-ID: 162867790705040043o6d864dd8je7634a4cee8150ac@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2007/5/3, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Neil Conway <neilc(at)samurai(dot)com> writes:
> > Pavel, my apologies for not getting back to you sooner.
> > On Wed, 2007-25-04 at 07:12 +0200, Pavel Stehule wrote:
> >> example: I have table with attr. cust_id, and I want to use parametrized
> >> view (table function) where I want to have attr cust_id on output.
>
> > Hmm, I see your point. I'm personally satisfied with adding a new
> > proargmode to solve this as you suggest.
>
> This will break client-side code that looks at proargmode, and I don't
> think the argument in favor is strong enough to justify that ...
>

can be. But similar changes was more times: named arguments, out,
inout attrb .. This depend on application. If any application is
written too simply then it can have problem. But which application
check proargmodes: pgadmin, phppgadmin, emsmanager, ... it's not
frequentation activity. And it's question for maintainers of this
applications. What difficult is change it? This syntax is usefull. It
lowers risk of name's colisition, and is more readable (if it do what
it have to do).

I am sorry, but I don't see sense of "new" table function syntax
without changes of proargmodes. Only shortcut for SETOF RECORD isn't
usefull. This syntax is standardised, is used in SQL/PSM which
PostgreSQL have to adapt this year, or next year, or maybe later, but
have to be adapted. And SQL/PSM knows only declared variables or
function's parameters. I forgot, it's can be usefull for SQL language
procedures. They don't use named arguments (how long?).

Regards
Pavel Stehule

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Kreen 2007-05-04 07:53:43 Re: RETURN QUERY in PL/PgSQL?
Previous Message Mark Kirkwood 2007-05-04 06:55:19 Re: Updated bitmap index patch