Re: dblink: add polymorphic functions.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: dblink: add polymorphic functions.
Дата
Msg-id 21220.1438203543@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: dblink: add polymorphic functions.  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: dblink: add polymorphic functions.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Merlin Moncure <mmoncure@gmail.com> writes:
> On Wed, Jul 29, 2015 at 12:53 PM, Joe Conway <mail@joeconway.com> wrote:
>> Ok, gotcha. So Tom's nearby comment about allowing the
>> "p_rowtype%TYPE" syntax to be used in the CAST is spot on (as usual).
>> In other words, to get a complete solution for you we would need to
>> make both things work, so you could do this inside plpgsql:

>> select * from cast(dblink(connstr, sql) as p_rowtype%TYPE);

> Would this be a pl/pgsql only solution?

Well, it would depend on how we fixed %TYPE, but my thought is that
we should teach the core parser to accept variable%TYPE anywhere that
a suitable "variable" is in scope.  The core already allows related
syntaxes in some utility commands, but not within DML commands.

(I am not sure offhand if the existing core syntax is exactly compatible
with what plpgsql does, though; and that could be a problem.)
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: more RLS oversights
Следующее
От: Robert Haas
Дата:
Сообщение: Re: more RLS oversights