Hello it work on my pc postgres=# \sf fx CREATE OR REPLACE FUNCTION public.fx() RETURNS SETOF integer LANGUAGE plpgsql AS $function$ declare g int[] = '{20}'; begin return next g[1]; return; end; $function$ postgres=# select fx(); fx ---- 20 (1 row) regards Pavel Stehule 2011/12/5 Maxim Boguk <maxim.boguk@xxxxxxxxx>: > Some quetions about pl/pgsql and arrays[]. > > Is such constructions as: > > RETURN NEXT array[1]; > > OR > > SELECT val INTO array[1] FROM ...; > > Should not work? > > At least documentation about RETURN NEXT says: > "RETURN NEXT expression;" > > I think array[1] is a valid expression. > > -- > Maxim Boguk > Senior Postgresql DBA. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general