From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Anonymous code block with parameters |
Date: | 2014-09-19 04:22:32 |
Message-ID: | CAFj8pRDZDYyUeFqzCnfxk-18ZSM_J+NoBPmZka5kXX0h1nL4GA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2014-09-18 22:35 GMT+02:00 Josh Berkus <josh(at)agliodbs(dot)com>:
> On 09/18/2014 01:29 PM, Vik Fearing wrote:
> > On 09/18/2014 10:16 PM, Hannu Krosing wrote:
> >>> WITH
> >>> FUNCTION f1(a int) RETURNS int AS $$ .. $$ LANGUAGE plpgsql,
> >>> FUNCTION f2(a int) RETURNS SETOF int AS $$ .. $$ LANGUAGE
> >>> plpgsql,
> >>> SELECT f1(x) FROM f2(z) LATERAL ....
> >>>
> >>> We can generalize WITH clause, so there SEQENCES, VIEWS, .. can be
> >>> defined for "single usage"
> >> +2
> >>
> >> I just proposed the same thing in another branch of this discussion
> >> before reading this :)
> >>
> >> I guess it proves (a little) that WITH is the right place to do these
> >> kind of things ...
> >
> > I've been wanting this syntax for a few years now, so I certainly vote
> > for it.
> >
>
> Just to clarify: I want the WITH syntax for different purposes.
> However, I *also* want DO $$ ... $$ USING ( ). Those are two separate,
> different features with different use-cases.
>
+1 as parametrized (read only) DO statement
>
> --
> Josh Berkus
> PostgreSQL Experts Inc.
> http://pgexperts.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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2014-09-19 05:12:36 | Re: On partitioning |
Previous Message | Alvaro Herrera | 2014-09-19 02:37:55 | Re: [GENERAL] pg_multixact issues |