Re: crosstab

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "Rosebrock, Uwe (Environment, Hobart)" <Uwe(dot)Rosebrock(at)csiro(dot)au>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: crosstab
Date: 2023-03-09 13:22:02
Message-ID: CAKFQuwZJ8yoGMRvVGG1zkVLqGn1Kw9GHTGsDJdgwD_X6=ypyPQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday, March 8, 2023, Rosebrock, Uwe (Environment, Hobart) <
Uwe(dot)Rosebrock(at)csiro(dot)au> wrote:

> 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
>
>
No, you cannot change query structure at execution time in SQL.

David J.

In response to

  • crosstab at 2023-03-09 06:07:38 from Rosebrock, Uwe (Environment, Hobart)

Browse pgsql-general by date

  From Date Subject
Next Message Алексей Ефимов 2023-03-09 14:45:29 find coumn name and his type with greatest size in bytes
Previous Message Laurenz Albe 2023-03-09 13:13:30 Re: public schema grants to PUBLIC role