Re: quote style in buffer - Mailing list pgsql-novice

From Michael Glaesemann
Subject Re: quote style in buffer
Date
Msg-id 0E369B0C-54BE-11D8-AB38-000A95C88220@myrealbox.com
Whole thread Raw
In response to quote style in buffer  (joseph speigle <joe.speigle@jklh.us>)
List pgsql-novice
Hi Joseph,

On Feb 1, 2004, at 7:40 PM, joseph speigle wrote:

> hi,
>
> I can't seem to find the comment for an sql file
>
> drop function dups();
> -- joe speigle
> -- Feb 1 2004
> CREATE FUNCTION dups() RETURNS int4
>       AS 'SELECT 1 as RESULT' LANGUAGE 'sql';

it looks like you've got at least one extra pair of single quotes: you
don't need to quote sql.

test=# CREATE OR REPLACE FUNCTION dups() RETURNS int4
test-#       AS 'SELECT 1 as RESULT' LANGUAGE SQL;
CREATE FUNCTION
test=# select * from dups();
  dups
------
     1
(1 row)

Hope that helps.

Michael Glaesemann
grzm myrealbox com


pgsql-novice by date:

Previous
From: joseph speigle
Date:
Subject: quote style in buffer
Next
From: Lawrence Smith
Date:
Subject: Re: Q: Reclaiming deleted space in data files