How to set alias data type?

From: Shaozhong SHI <shishaozhong(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: How to set alias data type?
Date: 2021-11-24 13:57:06
Message-ID: CA+i5JwbTxucfSepExn4JOSSWsXwaD=3bZVgh__u5O3WjJdNWSQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

select 'Total' as Total generate result that set Total as a column name
with unknown type

When trying to cast
select 'Total' as Total:: text

It simply does not work.

Regards,

David

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2021-11-24 14:09:58 Re: get last timestamp of table ddl
Previous Message Luca Ferrari 2021-11-24 13:53:24 get last timestamp of table ddl