Re: massive quotes?

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgresql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: massive quotes?
Date: 2003-09-01 21:43:53
Message-ID: 3F53BD99.4060906@pse-consulting.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

>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?
>
The parser would have to know about comments.

>How about "language"
>in what you think is a quoted literal string?
>
If it's quoted, it may contain anything without interfering, no?

>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.
>
This is so at the moment, while all samples use AS .... LANGUAGE. This
could stay free format if quoted as usual, and require it strict if the
new format is used. Initially, I didn't want to suggest an additional
keyword like ENDFUNC or ENDAS, but now I do. If somebody insists on
using such a keyword in the function definition body, he could fall back
to the quoted format.

Regards,
Andreas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-09-01 21:45:46 Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Previous Message Peter Eisentraut 2003-09-01 21:37:40 Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)