Re: PL/pgSQL support to define multi variables once

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Quan Zongliang <quanzongliang(at)gmail(dot)com>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL/pgSQL support to define multi variables once
Date: 2014-06-13 07:39:30
Message-ID: CAFj8pRAZNP9ebDWxReM3xSWkniCjhAXEFmx8u3j-WD=3ARqJ0A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

+ it is natural in almost all languages including ADA
- it increases a distance between PL/pgSQL and PL/SQL

I am don't think, so this feature is necessary, but I am not against it.

Regards

Pavel

2014-06-13 9:20 GMT+02:00 Quan Zongliang <quanzongliang(at)gmail(dot)com>:

> Hi all,
>
> Please find the attachment.
>
> 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;
>
>
> Regards,
> Quan Zongliang
>
>
> ---
> 此电子邮件没有病毒和恶意软件,因为 avast! 防病毒保护处于活动状态。
> http://www.avast.com
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-06-13 07:41:09 Re: PL/pgSQL support to define multi variables once
Previous Message Amit Kapila 2014-06-13 07:31:59 Re: Few observations in replication slots related code