Re: How to get DATE in server locale format - Mailing list pgsql-general

From Andrus
Subject Re: How to get DATE in server locale format
Date
Msg-id 44A5A41F9D564516A271557BC41FDFE6@andrusnotebook
Whole thread Raw
In response to Re: How to get DATE in server locale format  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How to get DATE in server locale format
List pgsql-general
> You might be able to get what you want with the to_char() function,
> if setting datestyle doesn't do the trick for you.

setting datestyle changes style for whole sql statement.

How to get this in a single conversion in sql statement so that other
expressions in same sql statement are not affected.

to_char() requires hard-coded format.
Different servers have different locales so that format is not know at
application design time.

How to get localized date for single conversion inside SELECT statement so
that it works in different server lc_time settings ?

Andrus.


pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Huge iowait during checkpoint finish
Next
From: "A. Kretschmer"
Date:
Subject: Re: How to get DATE in server locale format