crosstab

From: "Rosebrock, Uwe (Environment, Hobart)" <Uwe(dot)Rosebrock(at)csiro(dot)au>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: crosstab
Date: 2023-03-09 06:07:38
Message-ID: 49B02DE1-77FA-4748-AFD6-31F46DC43D38@csiro.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi List
I like to use crosstab to pivot a long list of rows into columns, however the column labels are created dynamically with the resulting column type known.

Is there a way pass a list of names and types to crosstab (‘query’) as (<‘type list as strings in array’> ) ?
In other words,
Can I pass an array to crosstab row labels

Cheers
Uwe

Responses

  • Re: crosstab at 2023-03-09 13:22:02 from David G. Johnston

Browse pgsql-general by date

  From Date Subject
Next Message Dominique Devienne 2023-03-09 09:34:45 public schema grants to PUBLIC role
Previous Message Pavel Stehule 2023-03-09 04:53:38 Re: Behavior of PL/pgSQL function following drop and re-create of a table that it uses