From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stuart Rison <stuart@ludwig.ucl.ac.uk>
Cc: mdalphin@amgen.com
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Anyone recognise this error from PL/pgSQL?
Date: Mon, 16 Aug 1999 10:12:11 -0400
Message-ID: <632.934812731@sss.pgh.pa.us> (raw)
In-Reply-To: <v04020a03b3dd80db8fc9@[128.40.242.190]>
Stuart Rison <stuart@ludwig.ucl.ac.uk> writes:
> Yes, I remember a posting about this a little while ago, the solution was
> so simple it made you want to kick yourself!
> SELECT * INTO zhvt_row FROM zhvt
> WHERE zhvtID=NEW.zhvtID;
> Becomes:
> SELECT * INTO zhvt_row FROM zhvt
> WHERE zhvtID = NEW.zhvtID; --spaces on either side of the equal
> I'm wondering if this is a bug that should be corrected in the parser or if
> it is correct syntax for the operator to be bound by spaces?
I thought it might be something like that ... probably plpgsql
transforms "NEW" into something involving a "$" and then the parser
misparses "=$" as a single operator. I'd argue that it's a plpgsql bug,
if that's right --- if plpgsql is doing text transformations that create
lexical ambiguities, it should be inserting spaces to prevent ambiguity.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, stuart@ludwig.ucl.ac.uk, mdalphin@amgen.com
Subject: Re: [SQL] Anyone recognise this error from PL/pgSQL?
In-Reply-To: <632.934812731@sss.pgh.pa.us>
References: <v04020a03b3dd80db8fc9@[128.40.242.190]> <632.934812731@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