Re: MAP syntax for arrays

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Ildar Musin <i(dot)musin(at)postgrespro(dot)ru>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: MAP syntax for arrays
Date: 2018-05-08 13:19:31
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 05/08/2018 08:57 AM, Ildar Musin wrote:
> select map (pow(2, x) - 1 for x in array[1,2,3,4,5]);

I wonder how efficient an implementation would be possible strictly
as a function, without grammar changes?

While PostgreSQL certainly has extensions to and divergences from
standard SQL syntax, some historical and some recent, it seems like
there ought to be a highish bar for adding new ones; or, looking at it
another way, has this feature been proposed to the SQL committee?
It doesn't sound like a bad idea, and supporting new syntax for it
would be an easier call it if it were known to be in an SQL draft


In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-05-08 13:21:19 Re: [HACKERS] Clock with Adaptive Replacement
Previous Message Robert Haas 2018-05-08 13:15:05 Re: [HACKERS] Parallel Append implementation