Обсуждение: Setting a default format for timestamp

Поиск
Список
Период
Сортировка

Setting a default format for timestamp

От
"Ferrell, Denise CTR NSWCDD, Z11"
Дата:
Hi All,

Using PostgreSQL 9.3 on Linux Red-Hat platform.

How would I go about setting a default format for the timestamp?  I've set the default for TimeZone to UTC.

Thank you in advance for any information.

DF


Re: [ADMIN] Setting a default format for timestamp

От
Scott Whitney
Дата:
_Where_ do you want that default format? Are you asking about a field? psql output? The O/S?

What you're asking might be as simple as "datestyle," if you're just talking the output mask:

http://www.postgresql.org/docs/9.1/static/runtime-config-client.html



DateStyle ( string )
Sets the display format for date and time values, as well as the rules for interpreting ambiguous date input values.
Forhistorical reasons, this variable contains two independent components: the output format specification ( ISO ,
Postgres, SQL , or German ) and the input/output specification for year/month/day ordering ( DMY , MDY , or YMD ).
Thesecan be set separately or together. The keywords Euro and European are synonyms for DMY ; the keywords US , NonEuro
,and NonEuropean are synonyms for MDY . See Section 8.5 for more information. The built-in default is ISO, MDY , but
initdbwill initialize the configuration file with a setting that corresponds to the behavior of the chosen lc_time
locale. 

----- Original Message -----

> Hi All,

> Using PostgreSQL 9.3 on Linux Red-Hat platform.

> How would I go about setting a default format for the timestamp? I've set the
> default for TimeZone to UTC.

> Thank you in advance for any information.

> DF

> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin