Re: Help with quotes in plpgsql

Поиск
Список
Период
Сортировка
От Milen A. Radev
Тема Re: Help with quotes in plpgsql
Дата
Msg-id 458849F1.1050100@radev.net
обсуждение исходный текст
Ответ на Help with quotes in plpgsql  (Richard Ray <rray@mstc.state.ms.us>)
Ответы Re: Help with quotes in plpgsql  (Richard Ray <rray@mstc.state.ms.us>)
Список pgsql-sql
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
orterminate 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



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Jim Buttafuoco"
Дата:
Сообщение: Re: Help with quotes in plpgsql
Следующее
От: "Hector Villarreal"
Дата:
Сообщение: Re: Help with quotes in plpgsql