Re: Re: Inserts in triggers Follow Up

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: Inserts in triggers Follow Up
Дата
Msg-id 21390.996075786@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Re: Inserts in triggers Follow Up  ("Josh Berkus" <josh@agliodbs.com>)
Список pgsql-sql
"Josh Berkus" <josh@agliodbs.com> writes:
> That's because the SELECT INTO variable and SELECT INTO record syntax
> are confusingly different.  It's

> for records:
> SELECT INTO record_var * FROM ...

> for simple variables:
> SELECT column INTO variable FROM ...

> I'm not clear on the origin of the inconsistency; my guess is that jan
> copied it over from PL/SQL.

No, this isn't right.  If you check the source code you will discover
that plpgsql is extremely lax about the positioning of the INTO clause,
and will in fact accept it almost anywhere.  Datatype has nothing to
do with this.  (It probably should be stricter, but at this point I
doubt we could change it without drawing howls of anguish from those
who did it the other way.)

I'm not sure about Morgan's problem, but I suspect it isn't in the
part of the query that he showed us.  An unexpected substitution
in the WHERE clause seems like a plausible theory.
        regards, tom lane


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

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: Re: Inserts in triggers Follow Up
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Meta integrity