Re: massive quotes?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Postgresql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: massive quotes?
Date: 2003-09-01 20:57:02
Message-ID: 10188.1062449822@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andreas Pflug <pgadmin(at)pse-consulting(dot)de> writes:
> Why not regard anything between "AS" and LANGUAGE as source?

That seems quite impractical, considering that the function body may be
in a language that has little in common with SQL even at the lexical
level. The SQL parser couldn't even tell what was a comment or quoted
string with any reliability.

> This would
> prevent the usage of LANGUAGE as a keyword inside the function
> definition, but I can't think of any senseful other use anyway.

Would you be unhappy if "language" appearing in what you think is a
comment in the function body caused a failure? How about "language"
in what you think is a quoted literal string?

Another problem is that the CREATE FUNCTION syntax doesn't insist on any
particular ordering of the attributes; there's nothing saying that
LANGUAGE must be the first thing after the AS clause.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lee Kindness 2003-09-01 20:57:07 Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Previous Message Tom Lane 2003-09-01 20:49:04 Re: TCP/IP with 7.4 beta2 broken?