public inbox for [email protected]  
help / color / mirror / Atom feed
Clarification in create_function.sgml
6+ messages / 5 participants
[nested] [flat]

* Clarification in create_function.sgml
@ 2003-10-21 10:13  Oliver Elphick <[email protected]>
  0 siblings, 2 replies; 6+ messages in thread

From: Oliver Elphick @ 2003-10-21 10:13 UTC (permalink / raw)
  To: pgsql-docs

It is necessary for single quotes and backslashes in a function
definition to be escaped, but the reference page does not make this
clear. 

diff -c -r1.52 create_function.sgml
*** create_function.sgml        11 Sep 2003 21:42:20 -0000      1.52
--- create_function.sgml        21 Oct 2003 10:10:08 -0000
***************
*** 252,257 ****
--- 252,261 ----
         language.  It may be an internal function name, the path to an
         object file, an SQL command, or text in a procedural language.
        </para>
+       <para>
+        Any single quotes or backslashes in the function definition must be
+        escaped by doubling them.
+       </para>
       </listitem>
      </varlistentry>

-- 
Oliver Elphick                                [email protected]
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "If ye then be risen with Christ, seek those things 
      which are above, where Christ sitteth on the right 
      hand of God. Set your affection on things above, not 
      on things on the earth."              Colossians 3:1,2




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Clarification in create_function.sgml
@ 2003-10-21 16:42  Peter Eisentraut <[email protected]>
  parent: Oliver Elphick <[email protected]>
  1 sibling, 2 replies; 6+ messages in thread

From: Peter Eisentraut @ 2003-10-21 16:42 UTC (permalink / raw)
  To: Oliver Elphick <[email protected]>; +Cc: pgsql-docs

Oliver Elphick writes:

> It is necessary for single quotes and backslashes in a function
> definition to be escaped, but the reference page does not make this
> clear.

This ought to be implicit in it being a string literal.

-- 
Peter Eisentraut   [email protected]




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Clarification in create_function.sgml
@ 2003-10-21 16:46  Oliver Elphick <[email protected]>
  parent: Peter Eisentraut <[email protected]>
  1 sibling, 1 reply; 6+ messages in thread

From: Oliver Elphick @ 2003-10-21 16:46 UTC (permalink / raw)
  To: Peter Eisentraut <[email protected]>; +Cc: pgsql-docs

On Tue, 2003-10-21 at 17:42, Peter Eisentraut wrote:
> Oliver Elphick writes:
> 
> > It is necessary for single quotes and backslashes in a function
> > definition to be escaped, but the reference page does not make this
> > clear.
> 
> This ought to be implicit in it being a string literal.

Yes, but people sometimes need to have things spelt out.

It took a fairly lengthy correspondence to convince one bug reporter
that there was no bug; spelling it out for him in the reference would
have helped.

-- 
Oliver Elphick                                [email protected]
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "If ye then be risen with Christ, seek those things 
      which are above, where Christ sitteth on the right 
      hand of God. Set your affection on things above, not 
      on things on the earth."              Colossians 3:1,2




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Clarification in create_function.sgml
@ 2003-10-21 16:48  Tom Lane <[email protected]>
  parent: Peter Eisentraut <[email protected]>
  1 sibling, 0 replies; 6+ messages in thread

From: Tom Lane @ 2003-10-21 16:48 UTC (permalink / raw)
  To: Peter Eisentraut <[email protected]>; +Cc: Oliver Elphick <[email protected]>; pgsql-docs

Peter Eisentraut <[email protected]> writes:
> Oliver Elphick writes:
>> It is necessary for single quotes and backslashes in a function
>> definition to be escaped, but the reference page does not make this
>> clear.

> This ought to be implicit in it being a string literal.

It is mentioned in many places, but not on that particular page.

I don't have a problem with adding something there too, but I think it
ought to go in the NOTES section rather than where Oliver has put it.
We commonly have "Don't forget that ..." kinds of items in NOTES.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Clarification in create_function.sgml
@ 2003-10-21 16:51  Josh Berkus <[email protected]>
  parent: Oliver Elphick <[email protected]>
  0 siblings, 0 replies; 6+ messages in thread

From: Josh Berkus @ 2003-10-21 16:51 UTC (permalink / raw)
  To: Oliver Elphick <[email protected]>; Peter Eisentraut <[email protected]>; +Cc: pgsql-docs

Oliver, Peter,

> It took a fairly lengthy correspondence to convince one bug reporter
> that there was no bug; spelling it out for him in the reference would
> have helped.

+1; we need things spelled out.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Clarification in create_function.sgml
@ 2003-10-26 04:34  Bruce Momjian <[email protected]>
  parent: Oliver Elphick <[email protected]>
  1 sibling, 0 replies; 6+ messages in thread

From: Bruce Momjian @ 2003-10-26 04:34 UTC (permalink / raw)
  To: Oliver Elphick <[email protected]>; +Cc: pgsql-docs


I have added this to the CREATE FUNCTION manual page, in the notes
section.


---------------------------------------------------------------------------

Oliver Elphick wrote:
> It is necessary for single quotes and backslashes in a function
> definition to be escaped, but the reference page does not make this
> clear. 
> 
> diff -c -r1.52 create_function.sgml
> *** create_function.sgml        11 Sep 2003 21:42:20 -0000      1.52
> --- create_function.sgml        21 Oct 2003 10:10:08 -0000
> ***************
> *** 252,257 ****
> --- 252,261 ----
>          language.  It may be an internal function name, the path to an
>          object file, an SQL command, or text in a procedural language.
>         </para>
> +       <para>
> +        Any single quotes or backslashes in the function definition must be
> +        escaped by doubling them.
> +       </para>
>        </listitem>
>       </varlistentry>
> 
> -- 
> Oliver Elphick                                [email protected]
> Isle of Wight, UK                             http://www.lfix.co.uk/oliver
> GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
>                  ========================================
>      "If ye then be risen with Christ, seek those things 
>       which are above, where Christ sitteth on the right 
>       hand of God. Set your affection on things above, not 
>       on things on the earth."              Colossians 3:1,2
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 

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




^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2003-10-26 04:34 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-21 10:13 Clarification in create_function.sgml Oliver Elphick <[email protected]>
2003-10-21 16:42 ` Peter Eisentraut <[email protected]>
2003-10-21 16:46   ` Oliver Elphick <[email protected]>
2003-10-21 16:51     ` Josh Berkus <[email protected]>
2003-10-21 16:48   ` Tom Lane <[email protected]>
2003-10-26 04:34 ` Bruce Momjian <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox