Re: plpgsql keywords are hidden reserved words - Mailing list pgsql-hackers

From Decibel!
Subject Re: plpgsql keywords are hidden reserved words
Date
Msg-id 6DCE8766-8547-4973-95A6-B87500B27607@decibel.org
Whole thread Raw
In response to Re: plpgsql keywords are hidden reserved words  (John DeSoi <desoi@pgedit.com>)
List pgsql-hackers
On Nov 5, 2007, at 11:58 AM, John DeSoi wrote:
> Is there any feasibility to the idea of allowing pl/pgsql variables  
> and parameters to be prefixed with a special character like '$'?  
> I'm constantly adding prefixes like 'v_' because of conflicts with  
> table or column names. It would be nice to have something like  
> "declare $myvar integer;" so it would be very easy to distinguish  
> variable and parameter names from structure names or reserved words.

+528,382 ;)

At least in 8.3, IIRC you can safely use the name of the function to  
refer to variables, but it would be very nice if you could just do  
$blah in embedded SQL statements.

While we're talking about plpgsql... is there a TODO to allow RAISE  
to take a variable instead of just a fixed string? Yes, I can always  
do RAISE '%', variable, but then I lose % expansion.
-- 
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828



pgsql-hackers by date:

Previous
From: Dave Cramer
Date:
Subject: Re: [hibernate-team] PostgreSQLDialect
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Simplifying Text Search