Skip site navigation (1) Skip section navigation (2)

Re: placeholder syntax

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Abhijit Menon-Sen <ams(at)wiw(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: placeholder syntax
Date: 2004-06-21 14:32:31
Message-ID: 2051.1087828351@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Abhijit Menon-Sen <ams(at)wiw(dot)org> writes:
> Should Postgres accept ? as a placeholder?

We think it's an operator character:

regression=# select 1 ? 4;
ERROR:  operator does not exist: integer ? integer

I count eighteen standard operators that would be broken if we changed
'?' to mean a parameter.

I am also pretty unclear on why '?' is a good notation for parameters,
seeing that it is very hard for either the user or the machine to tell
which is which when there are multiple parameters.

In short, I think this notation sucks and I don't want to emulate it.

We do have the :foo notation in ecpg, which may be your closest parallel
for handling Oracle-workalike code anyway.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Merlin MoncureDate: 2004-06-21 14:39:41
Subject: Re: Compile failure with SSL
Previous:From: Abhijit Menon-SenDate: 2004-06-21 12:26:25
Subject: placeholder syntax

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group