Re: Is "query" a reserved word in 8.3 plpgsql?

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Todd A(dot) Cook" <tcook(at)blackducksoftware(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is "query" a reserved word in 8.3 plpgsql?
Date: 2007-11-09 23:43:43
Message-ID: dcc563d10711091543j263f9495r8b6e12ba618a2557@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Nov 9, 2007 5:14 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Todd A. Cook" <tcook(at)blackducksoftware(dot)com> writes:
> > I saw the item in the release notes about the new "return query"
> > syntax in pl/pgsql, but I didn't see any note about "query" being
> > reserved now. Perhaps an explicit mention should be added?
>
> Yeah, I got burnt by that too. I have a bad feeling that that keyword
> is going to cause trouble for a lot of people.
>
> [ thinks for a bit... ] It might be possible to get rid of the keyword
> and have RETURN QUERY be recognized by an ad-hoc strcmp test, much like
> the various direction keywords in FETCH have been handled without making
> them real keywords. It'd be a bit uglier but it'd avoid making QUERY
> be effectively a reserved word.

It's not uncommon to have auditing triggers store things in tables
with fields named query in them. I know I have a few places that do
this...

Just sayin'

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-11-10 00:07:17 Re: [HACKERS] Is "query" a reserved word in 8.3 plpgsql?
Previous Message Joe Conway 2007-11-09 23:33:15 Re: [GENERAL] Crosstab Problems

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Kreen 2007-11-09 23:47:06 plpgsql: another new reserved word
Previous Message Bruce Momjian 2007-11-09 23:43:35 Re: Segmentation fault using digest from pg_crypto