On Dec 12, 2008, at 3:56 PM, Pavel Stehule wrote:
>> Hrm. I can see that, I guess. In that case, though, I think I'd
>> prefer the
>> colon at the beginning of the parameter label:
>>
>> SELECT foo( :bar => 'ick', :baz => 'ack' );
>
> this syntax is used yet
> http://www.postgresql.org/docs/8.3/interactive/app-psql.html
>
> testdb=> \set foo 'my_table'
> testdb=> SELECT * FROM :foo;
Oh, right. Damn.
In that case, I'm happy with your proposal of
name: [ => ] value
Where => is optional.
Or, if that just doesn't fly for reasons such as those cited by Greg
Stark, AS would seem to be the only choice left. Though what's on the
lhs vs the rhs is debatable:
SELECT foo( label AS 'value' ); SELECT foo( 'value' AS label );
Maybe they're reversible?
Best,
David