Re: PL/pgSQL 2
| От | Craig Ringer |
|---|---|
| Тема | Re: PL/pgSQL 2 |
| Дата | |
| Msg-id | 5404822A.7040008@2ndquadrant.com обсуждение исходный текст |
| Ответ на | Re: PL/pgSQL 2 (Andres Freund <andres@2ndquadrant.com>) |
| Ответы |
Re: PL/pgSQL 2
Re: PL/pgSQL 2 |
| Список | pgsql-hackers |
On 09/01/2014 10:24 PM, Andres Freund wrote:
> I know of format(), but it doesn't allow you to pass parameters as
> actual query variables unfortunately.
> I'm wondering if there's a way to marry USING and format()...
Well, the idiom:
EXECUTE format("SELECT %I FROM %I WHERE $1", col, tbl) USING val;
is not lovely. It works, but it's clumsy.
-- Craig Ringer http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: