pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: Morgan Curley <mcurley@e4media.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Re: Inserts in triggers Follow Up
Date: Wed, 25 Jul 2001 11:43:06 -0400
Message-ID: <21390.996075786@sss.pgh.pa.us> (raw)
In-Reply-To: <web-91191@davinci.ethosmedia.com>
References: <web-91191@davinci.ethosmedia.com>

"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



view thread (5+ messages)  latest in thread

Message-ID: <21390.996075786@sss.pgh.pa.us>
Permalink:  ../21390.996075786@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21390.996075786@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, josh@agliodbs.com, mcurley@e4media.com
  Subject: Re: Re: Inserts in triggers Follow Up
  In-Reply-To: <21390.996075786@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox