From: Milen A. Radev <milen@radev.net>
To: pgsql-sql@postgresql.org
Subject: Re: Help with quotes in plpgsql
Date: Tue, 19 Dec 2006 22:22:09 +0200
Message-ID: <458849F1.1050100@radev.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0612191404580.30942@rray.drdc.mstc.ms.gov>
References: <Pine.LNX.4.64.0612191404580.30942@rray.drdc.mstc.ms.gov>
Richard Ray написа:
> How should this be properly quoted
>
> create or replace function test(integer) returns setof text as $$
> declare
> a record;
> begin
> select into a now() - interval '$1 day';
> return next a;
> return;
> end
> $$ language 'plpgsql';
>
> I'm not having a lot of luck
Welcome to psql 8.2.0, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
milen=> create or replace function test(integer) returns setof text as $$
milen$> declare
milen$> a record;
milen$> begin
milen$> select into a now() - interval '$1 day';
milen$> return next a;
milen$> return;
milen$> end
milen$> $$ language 'plpgsql';
CREATE FUNCTION
milen=>
No problems here. What version are you using?
--
Milen A. Radev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: milen@radev.net
Subject: Re: Help with quotes in plpgsql
In-Reply-To: <458849F1.1050100@radev.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox