Re: massive quotes?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: massive quotes?
Date: 2003-09-11 16:57:14
Message-ID: 200309111657.h8BGvEa18727@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Uh, the problem with long keywords is that you are then requiring the
> > _parser_ to identify those keywords, and at that point, the entire text
> > between the keywords has been sliced up by the lexer, which will
> > certainly make it a mess. I might be wrong that we can even use more
> > then two characters for the start of quote string
>
> You're wrong. We can use anything we like for the start of the quote
> string; flex is quite capable of recognizing fixed strings, and even
> variable ones. I'd prefer to avoid expecting it to handle
> up/downcasing, I think, but there is no technical reason that the
> delimiter couldn't look like a keyword.
>
> My objection to the proposal FUNCTIONBODY is that it makes it look like
> the feature is only useful in CREATE FUNCTION. In point of fact, the
> quoting facility could be used to construct any SQL string literal. The
> comparison points I am thinking about are shell here-documents and
> Perl quoting conventions, both of which are used for many things.

Sounds good. I just think keywords in general are weird to use for
quoting. We use "'" for quoting, so something similar like another
operator combination would be nice. I have never been fond of the
here-document approach, though I can see the value of doing
here-documents in here-documents, though if we make the open and close
of the quote string different <--, -->, we can still do that, no?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-11 17:02:47 Re: Problem with function permission test in a view
Previous Message Tom Lane 2003-09-11 16:53:59 Re: massive quotes?