Re: Dollar Quoting doc patch--resend. - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Dollar Quoting doc patch--resend.
Date
Msg-id 200405061246.i46CkBY06037@candle.pha.pa.us
Whole thread Raw
In response to Re: Dollar Quoting doc patch--resend.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Dollar Quoting doc patch--resend.
List pgsql-patches
Tom Lane wrote:
> Neil Conway <neilc@samurai.com> writes:
> > On 6-May-04, at 12:41 AM, Bruce Momjian wrote:
> >> OK.  I am just afraid if we show 4 functions, and three use $$, and one
> >> doesn't use single-quotes inside, so we quote with single-quotes, that
> >> it would look strange.
>
> > Personally I don't think it would look that strange, but maybe that's
> > just me. Does anyone else want to weigh in here?
>
> I think we *have to* show examples both ways, otherwise people will get
> the impression that they *must* use $$ quotes and that all their
> existing function definitions are broken.
>
> I don't mind if the bulk of the examples are converted to whatever
> seems clearest, but certainly the CREATE FUNCTION reference page
> has to show both alternatives.

Agreed we have to show both. The question is whether we should prefer
single quotes and switch to $$ only when a single quote exists in the
body, or use $$ in most cases.  Of course CREATE FUNCTION should show
that both are possible, as well as $tag$.

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

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Dollar Quoting doc patch--resend.
Next
From: Bruce Momjian
Date:
Subject: thread