Re: RFC: Query Planner making a distinction between Cross Database and Cross Schema ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: RFC: Query Planner making a distinction between Cross Database and Cross Schema ?
Дата
Msg-id 25034.1076631116@sss.pgh.pa.us
обсуждение исходный текст
Ответ на RFC: Query Planner making a distinction between Cross Database and Cross Schema ?  (Stef <stef@chronozon.artofdns.com>)
Список pgsql-hackers
Stef <stef@chronozon.artofdns.com> writes:
>     For example, i would expect the following
> to work:

>     CREATE OR REPLACE FUNCTION test_autohist() RETURNS trigger
>     AS 'BEGIN
>             INSERT INTO history.test2 VALUES (new.field1,history.test_hist.nextval(), new.field2, new.field3,
new.field4,new.creation_id, new.creation_date, new.creation_id, new.creation_date);
 

Why would you expect that to work?

The problem is with this bit:history.test_hist.nextval()
which is a cross-database function reference per the standard SQL syntax
for such things.  (If you were in the history database, it wouldn't be
cross-database, but would refer to the nextval() function in the local
test_hist schema.)

I am not sure what you meant here, but I cannot see any need to
introduce a nonstandard syntax to resolve it.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Transaction aborts on syntax error.
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: RFC: Query Planner making a distinction between Cross