pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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
Cc: jwieck@debis.com
Subject: Re: [SQL] Anyone recognise this error from PL/pgSQL?
Date: Mon, 16 Aug 1999 13:35:02 -0400
Message-ID: <1611.934824902@sss.pgh.pa.us> (raw)
In-Reply-To: <v04020a00b3ddd52e6167@[128.40.242.190]>

Stuart Rison <stuart@ludwig.ucl.ac.uk> writes:
> CREATE FUNCTION test(int2) RETURNS int2 AS '
> SELECT field2 FROM test
> 	WHERE field1=$1;
> ' language 'sql';
> ERROR:  There is no operator '=$' for types 'int2' and 'int4'

That case is ambiguous: is it field1 =$ 1 or field1 = $1 ?  ("=$" is a
legal operator name according to Postgres.)  So I don't have a problem
with disallowing that.  But field1=NEW is not ambiguous under the
Postgres lexical rules, and plpgsql shouldn't be creating an
ambiguity...

			regards, tom lane



view thread (9+ messages)  latest in thread

Message-ID: <1611.934824902@sss.pgh.pa.us>
Permalink:  ../1611.934824902@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1611.934824902@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 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, jwieck@debis.com
  Subject: Re: [SQL] Anyone recognise this error from PL/pgSQL?
  In-Reply-To: <1611.934824902@sss.pgh.pa.us>
  References: <v04020a00b3ddd52e6167@[128.40.242.190]> <1611.934824902@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