Re: SQL function parse error ? - Mailing list pgsql-sql

From Radu-Adrian Popescu
Subject Re: SQL function parse error ?
Date
Msg-id 001b01c2b7f2$f1cdcc00$0600a8c0@rpopescu
Whole thread Raw
In response to SQL function parse error ?  ("Radu-Adrian Popescu" <radu.popescu@aldratech.com>)
List pgsql-sql
Hello, nice to hear from you. I sent my message just before this one
arrived, sorry... :(
About the   >Nonsense.  SQL syntax is space-sensitive.  Or have you successfully   >written   >SELECTXFROMY;
>lately?
I do hope this is a joke. If not, it's an insult.
If it's not even that, then the joke's not on me, as it is quite obvious
that the "selectxfromy" counter-example
is bogus and childish.
Look at the following C code:
intmain(){return-10;}    // no good
int main(){return-10;}    // quite valid
Or the the following SQL code :
SELECT * from test where age>23;
SELECT * from test where age           >                                       23;

Now that will work on any given sql database, both queries. And the C
program will compile with most C compilers.
The fact that >$1 gets interpreted as an operator when there is no operator
>$ is nonsense.
I belive there is an issue here, and it's quite frustrating to see it
dismissed with such childish replies.
I have been working with PostgreSql for two years now, and i like it very
much. The one reason i sent out the first email
was to report something which striked me as odd in the first place (even if
it took under 10 seconds to get it fixed), something
that will make people just starting out with postgresql (like some of my
colleagues here) turn to me and laugh their heads off,
people having years of experience with, say, MSSql.

This is supposed to be constructive, not slaping eachother.
For that reason, i appologize for whatever harsh remarks i've made, and
simply hope to get a straight answer or even better a
conversation.

Regards,

=====
Radu-Adrian Popescu
CSA, DBA, Developer
Aldratech Ltd.

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Radu-Adrian Popescu" <radu.popescu@aldratech.com>
Cc: <pgsql-sql@postgresql.org>
Sent: Thursday, January 09, 2003 4:48 PM
Subject: Re: [SQL] SQL function parse error ?


"Radu-Adrian Popescu" <radu.popescu@aldratech.com> writes:
> This is SQL, and people who are using PostgreSql write SQL, not
> whitespace-sensitive SQL, bash or whatever.

Nonsense.  SQL syntax is space-sensitive.  Or have you successfully
written
SELECTXFROMY;
lately?

There has occasionally been talk of disallowing '$' as a valid character
in operator names, which would eliminate the syntactic ambiguity in this
example.  But undoubtedly it would also break a few applications that
use '$' in user-defined operator names, so the proposal hasn't passed
to date.

> Is there any operator named >$ ?

Whether there is one in the standard distribution is quite irrelevant.
It's a valid operator name according to the current rules, and so open
to definition by anyone who wants to.

The most recent discussion I can find about this is the pgsql-hackers
thread "Dollar in identifiers" from Aug 2001, eg
http://archives.postgresql.org/pgsql-hackers/2001-08/msg00629.php
There didn't seem to be a consensus to change things, so the old
behavior stands, for the moment.

regards, tom lane





pgsql-sql by date:

Previous
From: Achilleus Mantzios
Date:
Subject: Re: SQL function parse error ?
Next
From: "Radu-Adrian Popescu"
Date:
Subject: Re: SQL function parse error ?