From: | "Nico Callewaert" <nico(dot)callewaert(at)ets-informatics(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Trigger function syntax |
Date: | 2007-11-08 15:35:38 |
Message-ID: | EC1CEB5509FC644FA5C839B7CD513A1935E5F8@serverets.ets-informatics.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi Tom,
Thank you very much for the reply !
As for the manuals I asked, is there any very good book out there that
focuses on triggers / stored procedures, because I used to work with
Firebird and I find it difficult to find my way in the PostgreSQL
syntax.
Thank you !
Best regards, Nico
-----Oorspronkelijk bericht-----
Van: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Verzonden: donderdag 8 november 2007 16:31
Aan: Nico Callewaert
CC: pgsql-novice(at)postgresql(dot)org
Onderwerp: Re: [NOVICE] Trigger function syntax
"Nico Callewaert" <nico(dot)callewaert(at)ets-informatics(dot)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-SY
NTAX-IDENTIFIERS
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Oliveiros Cristina | 2007-11-08 17:50:16 | Obtaining the primary key of the record just inserted |
Previous Message | Tom Lane | 2007-11-08 15:28:36 | Re: Trigger function syntax |