Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA86694 for ; Mon, 16 Aug 1999 10:13:27 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA00634; Mon, 16 Aug 1999 10:12:11 -0400 (EDT) To: Stuart Rison cc: mdalphin@amgen.com, pgsql-sql@postgreSQL.org Subject: Re: [SQL] Anyone recognise this error from PL/pgSQL? In-reply-to: Your message of Mon, 16 Aug 1999 09:59:21 +0100 Date: Mon, 16 Aug 1999 10:12:11 -0400 Message-ID: <632.934812731@sss.pgh.pa.us> From: Tom Lane Stuart Rison 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