Re: expression evaluation with expected datatypes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: expression evaluation with expected datatypes
Date: 2012-07-08 16:00:23
Message-ID: 3924.1341763223@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> When I worked on parametrised DO statement, I had to solve following issue:

> Syntax is:

> DO (param list) $$ ... $$ LANGUAGE ... USING expr_list

> What is correct way for evaluation of expr_list with specified target types?

I'd argue that that's a pointlessly unwieldy syntax that's creating an
unnecessary problem. Just use a SELECT list, that is

DO ... USING value AS name, value2 AS name2, ...

The value expressions can define their own types just fine.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2012-07-08 16:25:07 Re: expression evaluation with expected datatypes
Previous Message Joel Jacobson 2012-07-08 12:45:48 Re: Schema version management