Re: [PATCH] Add native PIVOT syntax for SQL Server/Oracle compatibility - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCH] Add native PIVOT syntax for SQL Server/Oracle compatibility
Date
Msg-id 54582db0-8b11-45de-97e2-0382c9f632e6@eisentraut.org
Whole thread Raw
In response to [PATCH] Add native PIVOT syntax for SQL Server/Oracle compatibility  (Myles Lewis <myles93@sbcglobal.net>)
List pgsql-hackers
On 25.11.25 06:01, Myles Lewis wrote:
> I've developed a patch that adds native PIVOT syntax to PostgreSQL,
> enabling SQL Server and Oracle-style pivot queries.

Your patch does not contain any documentation, so it's hard to tell what 
this is supposed to do if you don't already know those other products. 
Can you supply at least some informal documentation, and maybe some 
links to relevant documentation from those other products.

> - Supports SUM, COUNT, AVG, MIN, MAX

Hardcoding aggregate names like this is not going to work.  Aggregate 
functions can be user-defined, so you can't tell just from the name what 
they are doing.  You'll need to look them up in the catalog based on 
their properties.




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Optimize LISTEN/NOTIFY
Next
From: Andres Freund
Date:
Subject: Re: Buffer locking is special (hints, checksums, AIO writes)