Re: [BUGS] Odd behavior of SELECT INTO in PL/pgSQL

2010-07-20 Thread Pavel Stehule
Hello, this is solved in new PostgreSQL 9.0 postgres=# create table test_table(id int); CREATE TABLE postgres=# CREATE OR REPLACE FUNCTION select_test() postgres-# postgres-# RETURNS void AS postgres-# postgres-# $BODY$ postgres$# postgres$# DECLARE postgres$# postgres$# id integer = -1; postgr

[BUGS] Odd behavior of SELECT INTO in PL/pgSQL

2010-07-20 Thread depstein
PostgreSQL 8.4 Here is a PL/pgSQL procedure: CREATE OR REPLACE FUNCTION select_test() RETURNS void AS $BODY$ DECLARE id integer = -1; BEGIN select max(id) into id from test_table; END $BODY$ LANGUAGE 'plpgsql' VOLATILE COST 100; test_table is some table with an integer column 'id'. The ab