From: Rodrigo De León <rdeleonp@gmail.com>
To: pgsql-sql@postgresql.org
Cc: Nemo Terry <ntuser155@hotmail.com>
Subject: Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...)
Date: Tue, 15 May 2007 02:14:57 -0500
Message-ID: <a55915760705150014y538341dj2fc5aef0500fd689@mail.gmail.com> (raw)
In-Reply-To: <BAY19-F7C1E88EB8DBB10FEBC7D1F53D0@phx.gbl>
References: <a55915760705142325u33359969wef53e8bd20bdbc11@mail.gmail.com>
<BAY19-F7C1E88EB8DBB10FEBC7D1F53D0@phx.gbl>
On 5/15/07, Nemo Terry <ntuser155@hotmail.com> wrote:
> But I must use it in function,so...
> Do you have another solution?
So?
----------------------------------------
t=# CREATE TABLE d(i INT);
CREATE TABLE
t=# CREATE OR REPLACE FUNCTION add1(x INT) RETURNS INT AS
t-# $$
t$# BEGIN
t$# INSERT INTO d VALUES(x);
t$# RETURN x;
t$# END;
t$# $$ LANGUAGE plpgsql;
CREATE FUNCTION
t=# SELECT add1(1);
1
t=# SELECT add1(2);
2
t=# SELECT add1(3);
3
t=# SELECT * FROM d;
1
2
3
----------------------------------------
Do you need something else?
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: rdeleonp@gmail.com, ntuser155@hotmail.com
Subject: Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...)
In-Reply-To: <a55915760705150014y538341dj2fc5aef0500fd689@mail.gmail.com>
* 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