Quan Zongliang <quanzongli...@gmail.com> writes:
> CREATE OR REPLACE FUNCTION try_mutlivardef() RETURNS text AS $$
> local_a, local_b, local_c text := 'a1----';
> return local_a || local_b || local_c;
> end;
> $$ LANGUAGE plpgsql;

This does not seem like a terribly good idea from here.  The main problem
with the syntax is that it's very unclear whether the initializer (if any)
applies to all the variables or just one.  C users will probably think
the latter but your example seems to suggest that you think the former.
I doubt that this adds so much usefulness that it's worth adding confusion

                        regards, tom lane

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to