Re: PL/pgSQL support to define multi variables once - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: PL/pgSQL support to define multi variables once
Date
Msg-id CAB7nPqS9Dzz85h+vunuYNfmy=bdyeXf0N3wp+V2Vs0k41b+-OA@mail.gmail.com
Whole thread Raw
In response to PL/pgSQL support to define multi variables once  (Quan Zongliang <quanzongliang@gmail.com>)
Responses Re: PL/pgSQL support to define multi variables once  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On Fri, Jun 13, 2014 at 4:20 PM, Quan Zongliang <quanzongliang@gmail.com> wrote:
> By my friend asking, for convenience,
> support to define multi variables in single PL/pgSQL line.
>
> Like this:
>
> CREATE OR REPLACE FUNCTION try_mutlivardef() RETURNS text AS $$
> DECLARE
> local_a, local_b, local_c text := 'a1----';
> BEGIN
> return local_a || local_b || local_c;
> end;
> $$ LANGUAGE plpgsql;
I don't recall that this is possible. Have a look at the docs as well:
http://www.postgresql.org/docs/current/static/plpgsql-declarations.html
-- 
Michael



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: PL/pgSQL support to define multi variables once
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Use unique index for longer pathkeys.