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: Jon Jensen <jon(at)endpoint(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: massive quotes?
Date: 2003-09-12 02:20:36
Message-ID: 200309120220.h8C2KaW10432@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Keep in mind that we have two different requirements: the quote start
> marker has to be recognizable while we are parsing SQL (or possibly
> plpgsql) code. The quote end marker has to be recognizable while we are
> scanning text that could be almost anything.
>
> The cute thing about the here-document solution to this problem is that
> you can choose the quote end marker on a case-by-case basis. So you can
> always pick something that won't conflict with anything that's actually
> in the text you need to quote.
>
> If we try to go with fixed markers (like {' ... }' and some other ideas
> that were floated today), then we lose that flexibility, and we're up
> against the losing game of trying to pick an end-marker that won't cause
> problems in any programming language anywhere (not to mention possible
> uses of the quoting mechanism for arbitrary string literals that aren't
> even function bodies).
>
> I'm not wedded to the "$$FOO" idea in particular, but I do think we want
> to go with a solution that allows a variable end-marker.

Agreed --- with multiple languages, we have to allow users to specify a
unique end marker.

--
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-12 02:23:31 Re: Reorganization of spinlock defines
Previous Message Bruce Momjian 2003-09-12 02:13:32 Re: Examining the output of: ldd `which postgres`