From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Josh Berkus" <josh(at)agliodbs(dot)com> |
Cc: | Morgan Curley <mcurley(at)e4media(dot)com>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Re: Inserts in triggers Follow Up |
Date: | 2001-07-25 15:43:06 |
Message-ID: | 21390.996075786@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
"Josh Berkus" <josh(at)agliodbs(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2001-07-25 15:53:45 | Re: Re: Inserts in triggers Follow Up |
Previous Message | Tom Lane | 2001-07-25 15:31:49 | Re: Inserts in triggers |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2001-07-25 15:53:45 | Re: Re: Inserts in triggers Follow Up |
Previous Message | Tom Lane | 2001-07-25 15:31:49 | Re: Inserts in triggers |