Dollaw sign quoting disabled - Mailing list pgsql-general

From snappingturtle
Subject Dollaw sign quoting disabled
Date
Msg-id 1164242042.629558.126570@f16g2000cwb.googlegroups.com
Whole thread Raw
Responses Re: Dollaw sign quoting disabled  (Bricklen Anderson <banderson@presinet.com>)
Re: Dollaw sign quoting disabled  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-general
It appears that in my installation of Postgres that dollaw sign quoting
is disabled.  For example, the following command returns an error:

 CREATE or replace FUNCTION add_em(int, int) RETURNS integer AS $$
     SELECT $1 + $2;
 $$ LANGUAGE SQL;

The error:

 psql:borman.sql:6: ERROR:  syntax error at or near "$" at character 72
 psql:borman.sql:7: ERROR:  syntax error at or near "$" at character 1

Putting something between the dollar signs (e.g. $FUNCTION$) produces
the same error. Using regular quotes works, however:

 CREATE or replace FUNCTION add_em(int, int) RETURNS integer AS '
     SELECT $1 + $2;
 ' LANGUAGE SQL;

 CREATE FUNCTION

I didn't do anything (that I know of) to disable dollar quoting.  Any
advice on how to enable dollar sign quoting?


pgsql-general by date:

Previous
From: Ragnar
Date:
Subject: Re: IN clause
Next
From: sasan3@gmail.com
Date:
Subject: PGDATA