Re: Constructing colum name as alias - Mailing list pgsql-sql

From chris
Subject Re: Constructing colum name as alias
Date
Msg-id 18007723.72e9.17d0f62427a.Coremail.yuanzefuwater@126.com
Whole thread Raw
In response to Re: Constructing colum name as alias  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-sql
font{ line-height: 1.6; } ul,ol{ padding-left: 20px; list-style-position: inside; }
A flexible way to application, don’t know the actually value🤦‍♂️ see below:

select * from (Select ('Status as on '||date_part('day', (SELECT current_timestamp))||'th '||TO_CHAR(current_timestamp, 'Mon'))
union all
select now()::text from t1) foo limit 11;

Regards,
Chris
On 11/11/2021 22:16David G. Johnston<david.g.johnston@gmail.com> wrote:
On Thu, Nov 11, 2021 at 7:14 AM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Thu, Nov 11, 2021 at 6:23 AM Theodore M Rolle, Jr. <stercor@gmail.com> wrote:
May we have an example?

Here are the docs detailing writing dynamic SQL commands in pl/pgsql.



Though, as you probably want to see these columns in your application you will probably need to translate the concept to whatever programming language and database client interface you are using.

David J.

Attachment

pgsql-sql by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Constructing colum name as alias
Next
From: aditya desai
Date:
Subject: SELECT on view runs slower with more WHERE conditions