Re: Reserved words and named function parameters

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reserved words and named function parameters
Date: 2004-01-06 19:48:43
Message-ID: 3FFB111B.8070807@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

>I've been reviewing Dennis Bjorklund's patch to support named
>function parameters:
>http://archives.postgresql.org/pgsql-patches/2003-12/msg00176.php
>
>One thing I didn't like about it was that the grammar declared
>param_name as plain IDENT, meaning that you could not use even
>"unreserved" keywords as param names. One would prefer ColId, but
>naturally that causes a truckload of shift and reduce conflicts :-(
>
>After some fooling around I find that these combinations work:
>
>1. Make param_name equate to type_name (allowing IDENT or
>unreserved_keyword), and move the following keywords from
>"unreserved" to "col_name_keyword" status:
> DOUBLE INOUT NATIONAL OUT
>
>2. Make param_name equate to function_name (allowing IDENT,
>unreserved_keyword, or func_name_keyword). This requires the
>above changes plus moving "IN" from func_name_keyword to fully
>reserved status.
>
>Any opinions which to do, or alternate proposals? I'm leaning
>slightly to #2, since I doubt anyone is trying to use "IN" as
>a function name, but ...
>
>
>

I support #2 rather more strongly ;-)

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2004-01-06 20:08:18 Re: Paypal
Previous Message Joshua D. Drake 2004-01-06 19:39:45 Re: Paypal WAS: PostgreSQL speakers needed for OSCON