Re: PL/pgSQL 2 - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: PL/pgSQL 2
Date
Msg-id 540480B5.8070003@2ndquadrant.com
Whole thread Raw
In response to Re: PL/pgSQL 2  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: PL/pgSQL 2  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On 09/01/2014 10:17 PM, Andres Freund wrote:
> Imo this is still something that's more dynamic SQL (i.e. EXECUTE's
> remit) than something that shouldn't be doable implicitly. So perhaps
> the solution is to extend EXECUTE to allow specifying tablenames as
> variables more conveniently?

With format(...) it's pretty easy, really.

Perhaps just changing the docs to remove all the quote_ident based
examples in favour of format(...) would be enough.

Pavel's points are pretty good - what exists now isn't ideal from a
usability and friendliness PoV, but changing it would require making a
big mess elsewhere that's not worth doing.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: PL/pgSQL 2
Next
From: Pavel Stehule
Date:
Subject: Re: PL/pgSQL 2