Re: Anonymous code block with parameters

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Kalyanov Dmitry <kalyanov(dot)dmitry(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Anonymous code block with parameters
Date: 2014-09-17 20:17:22
Message-ID: CAFj8pRBEM74SrW=9r=PWwu3cQL332J_B=CNNUT4woK0iVQBQAw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2014-09-17 22:07 GMT+02:00 Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>:

> On 09/16/2014 10:09 AM, Heikki Linnakangas wrote:
> > On 09/16/2014 10:57 AM, Craig Ringer wrote:
> >> On 09/16/2014 03:15 PM, Pavel Stehule wrote:
> >>
> >>> Why we don't introduce a temporary functions instead?
> >>
> >> I think that'd be a lot cleaner and simpler. It's something I've
> >> frequently wanted, and as Hekki points out it's already possible by
> >> creating the function in pg_temp, there just isn't the syntax sugar for
> >> "CREATE TEMPORARY FUNCTION".
> >>
> >> So why not just add "CREATE TEMPORARY FUNCTION"?
> >
> > Sure, why not.
>
> Because you still have to do
>
> SELECT pg_temp.my_temp_function(blah);
>
> to execute it.
>

this problem should be solvable. I can to use a temporary tables without
using pg_temp schema.

Pavel

>
> >> It means two steps:
> >>
> >> CREATE TEMPORARY FUNCTION ... $$ $$;
> >>
> >> SELECT my_temp_function(blah);
>
> That won't work; see above.
> --
> Vik
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dev Kumkar 2014-09-17 20:36:46 Re: [SQL] pg_multixact issues
Previous Message Vik Fearing 2014-09-17 20:07:21 Re: Anonymous code block with parameters