Search Postgresql Archives

Re: PostgreSQL Functions / PL-Language

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2/19/06, Michael Fuhr <mike@xxxxxxxx> wrote:
On Sat, Feb 18, 2006 at 04:48:55PM +0800, Jan Cruz wrote:

 

CREATE TABLE foo (id integer, t text);
INSERT INTO foo VALUES (1, 'one');
INSERT INTO foo VALUES (2, 'two');



Thanks for the correct syntaxing Mike.

BTW I also got something like this:

CREATE FUNCTION func2() RETURNS SETOF foo as $$
DECLARE
row foo;
BEGIN
  SELECT INTO ROW * from FOO;
   return next foo;
END;
$$ LANGUAGE plpgsql STABLE;

select * from func2();

It did return the 2 rows (all rows) when I first test it.
Then today I tried the same function  and test it then it return only 1 row.

I wonder..........

BTW, I'm using PostgreSQL 8.1.3.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux