pg.ddx.io pgsql-php@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Comments and datestyle 2+ messages / 2 participants [nested] [flat]
* Comments and datestyle @ 2002-12-02 19:26 Kelvin Varst <kelvin@varst.dk> 0 siblings, 1 reply; 2+ messages in thread From: Kelvin Varst @ 2002-12-02 19:26 UTC (permalink / raw) To: pgsql-php Hi, Q1: Is there any way I can get the comments, I wrote on each colomn when I created the table? Q2: I have a datestyle on the database witch is ISO, EUROPEAN (02-12-2002). Then I have a coloumn with the type Date. When I query the table, the format written on my homepage is ISO, US (2002-12-02). How can I convert the datestyle on the homepage, so it matches the database datestyle? Kelvin :-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Comments and datestyle @ 2002-12-02 20:16 Keary Suska <hierophant@pcisys.net> parent: Kelvin Varst <kelvin@varst.dk> 0 siblings, 0 replies; 2+ messages in thread From: Keary Suska @ 2002-12-02 20:16 UTC (permalink / raw) To: pgsql-php on 12/2/02 12:26, kelvin@varst.dk purportedly said: > Q1: Is there any way I can get the comments, I wrote on each colomn when I > created the table? Well, there is no mechanism in Postgres for specifying comments during table creation, but some apps emulate this by calling the COMMENT command as applicable. In any case, to retrieve table comments: SELECT pg_description.description FROM pg_class, pg_description WHERE pg_class.relname = 'table_name' AND pg_class.oid = pg_description.classoid > Q2: I have a datestyle on the database witch is ISO, EUROPEAN (02-12-2002). > Then I have a coloumn with the type Date. When I query the table, the format > written on my homepage is ISO, US (2002-12-02). How can I convert the > datestyle on the homepage, so it matches the database datestyle? DATESTYLE is a run-time configuration variable, and is only valid for the connected session, which isn't reliable in an HTTP environment. You are better off using to_char() to format your date output. Keary Suska Esoteritech, Inc. "Leveraging Open Source for a better Internet" ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-12-02 20:16 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2002-12-02 19:26 Comments and datestyle Kelvin Varst <kelvin@varst.dk> 2002-12-02 20:16 ` Keary Suska <hierophant@pcisys.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox