pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Keary Suska <hierophant@pcisys.net>
To: Postgres-PHP <pgsql-php@postgresql.org>
Subject: Re: Comments and datestyle
Date: Mon, 02 Dec 2002 13:16:31 -0700
Message-ID: <BA110DAF.15F25%hierophant@pcisys.net> (raw)
In-Reply-To: <1038856831.18027@mail4.wannafind.dk>

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"




view thread (2+ messages)

Message-ID: <BA110DAF.15F25%hierophant@pcisys.net>
Permalink:  ../BA110DAF.15F25%25hierophant@pcisys.net/
Also on:    postgresql.org/message-id/BA110DAF.15F25%hierophant@pcisys.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: hierophant@pcisys.net
  Subject: Re: Comments and datestyle
  In-Reply-To: <BA110DAF.15F25%hierophant@pcisys.net>
  References: <1038856831.18027@mail4.wannafind.dk> <BA110DAF.15F25%hierophant@pcisys.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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