Re: Trigger function syntax

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Trigger function syntax
Дата
Msg-id 24670.1194535716@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Trigger function syntax  ("Nico Callewaert" <nico.callewaert@ets-informatics.com>)
Список pgsql-novice
"Nico Callewaert" <nico.callewaert@ets-informatics.com> writes:
> I don't understand the difference between the following syntax  :
> CREATE FUNCTION "test_check_a_id" () RETURNS opaque AS '
> CREATE FUNCTION LAST_UPDATED() RETURNS "trigger" AS $$
> Especially the difference between opaque and "trigger".

Trigger is the recommended way of declaring triggers.  Opaque was
the way to do it before we invented the separate trigger pseudo-type
(which happened in 7.3 IIRC ... a long time ago, anyway).  Opaque
was serving so many different purposes that we felt it needed to be
split up --- see the table in
http://www.postgresql.org/docs/8.2/static/datatype-pseudo.html

> And the double quotes, seems sometimes used and sometimes not.

They don't make any difference in the above example.  See
http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS

            regards, tom lane

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

Предыдущее
От: "Josh Tolley"
Дата:
Сообщение: Re: client authentication - password encryption
Следующее
От: "Nico Callewaert"
Дата:
Сообщение: Re: Trigger function syntax