On 5/15/07, Nemo Terry <ntuser155(at)hotmail(dot)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?