=?iso-8859-1?q?Jeff=20Anto?= <antojf2001@yahoo.fr> writes:
> am I wrong or the optionnal syntax
> INSERT INTO foo(foo_col1) VALUES ('blahblah');
> dosen't work within a PLPGSQL-written function ?
Works for me:
regression=# create table foo(foo_col1 text);
CREATE
regression=# INSERT INTO foo(foo_col1) VALUES ('blahblah');
INSERT 1918283 1
regression=# create function doit(text) returns int as '
regression'# begin
regression'# INSERT INTO foo(foo_col1) VALUES ($1);
regression'# return 1;
regression'# end' language plpgsql;
CREATE
regression=# select doit('zzz');
doit
------
1
(1 row)
regression=# select * from foo;
foo_col1
----------
blahblah
zzz
(2 rows)
regression=#
What are you doing differently?
regards, tom lane