Search Postgresql Archives

Dollaw sign quoting disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux