Re: Problem with LEFT function...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: patrick(dot)fiche(at)aqsacom(dot)com
Cc: "PostgreSQL - General (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem with LEFT function...
Date: 2002-09-05 22:49:44
Message-ID: 9154.1031266184@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Patrick Fiche" <patrick(dot)fiche(at)aqsacom(dot)com> writes:
> SELECT 'Begin' || LEFT( 'String1', 3 ) -> ERROR: parser: parse error at or
> near "LEFT"

Use a different function name. LEFT is a reserved word, and while PG
will let you get away with using it as a function name anyway, there
are situations like this where the normal interpretation of the keyword
takes precedence.

I've tweaked the grammar for 7.3 so that this particular case works,
but you'd still have similar problems if you were to use, say, BETWEEN
as a function name.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2002-09-05 22:51:44 Re: Surprise :-(
Previous Message Mihai Gheorghiu 2002-09-05 21:11:18 Re: Surprise :-(