Re: expression evaluation with expected datatypes

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: expression evaluation with expected datatypes
Date: 2012-07-10 12:25:01
Message-ID: CAFj8pRDTHNvmfcnViQHyPSFPNwdxK1jZo+bS_vH0zfwiHeQ=bw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2012/7/10 Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>> When I worked on parametrised DO statement, I had to solve following issue:
>
> DO currently is a utility command, not a query. Do you mean to change
> that?
>
> Also, did you think about a lambda construct, which is basically
> allowing functions to be defined inline in a query?
>
> We could imagine several syntax to show up the idea, common keywords
> here include LAMBDA, FLET or LABELS, but I think that expanding WITH
> would be preferable for us.
>
> WITH FUNCTION foo(param list) returns rettype language foo AS (
> definition here
> )
> <query using foo() here>;
>
> Other WITH extensions we can think about include support for DCL as
> asked by David Fetter in the past already, and support for variables too
> (a kind of per-query SET LOCAL).
>
> I don't see how adding parameters and return values to utility commands
> is going to be easier than adding a "lambda" facility.

I don't think so we need true LAMBDA - we don't need support for
recursion and we don't need to modify system tables.

I don't see any advantage and usage of this complex syntax

Regards

Pavel

>
> Regards,
> --
> Dimitri Fontaine
> http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Wanner 2012-07-10 13:07:56 BlockNumber initialized to InvalidBuffer?
Previous Message Dimitri Fontaine 2012-07-10 12:22:55 Re: pg_prewarm