[BUGS] Should Aggregate Functions always return one row?

2004-01-24 Thread wilhelm . pakulla
Hello. Is this a bug? >linux=# SELECT * FROM test; > x >--- > 1 > 2 > 3 >(3 Rows) > >linux=# SELECT * FROM test WHERE FALSE; > x >--- >(0 Rows) > >phlegma=# SELECT max(x) FROM test WHERE FALSE; > max >- > >(1 Rows) > >phlegma=# So, if I use the max() aggregate, I receive one row with the val

[BUGS] Passing composite type to function fails...

2004-02-04 Thread Wilhelm Pakulla
Mahlzeit. Is it a bug or a feature? Wilhelm -- Code -- CREATE TYPE t_test AS ( a INTEGER, b INTEGER ); CREATE FUNCTION f_init1 ( INTEGER ) RETURNS t_test AS ' DECLARE dummy ALIAS FOR $1; local t_test; BEGIN local.a := 1; local.b := 2; RETURN local; END; ' LANGUAGE 'plpgsql' IMMUT