Re: auto update dates

Поиск
Список
Период
Сортировка
От Rory Campbell-Lange
Тема Re: auto update dates
Дата
Msg-id 20020524151253.GA1887@campbell-lange.net
обсуждение исходный текст
Ответ на Re: auto update dates  ("Joel Burton" <joel@joelburton.com>)
Список pgsql-novice
Thanks for the pointers, Joel.

On 24/05/02, Joel Burton (joel@joelburton.com) wrote:
> > On 23/05/02, Joel Burton (joel@joelburton.com) wrote:
> > > current_time returns timezone information, but you're trying to
> > > store this in a field that is time w/o timezone information.
> > > either coerce this data yourself, or make the field hold timezone
> > > info.

> >     ERROR:  Cannot cast type 'timestamp with time zone'
> > How do I get around this? I can see various time functions with and
> > without time zone data, but I don't know how to utilise them.

> SELECT cast(current_timestamp as time with time zone);
> will do nicely. See the Date/Time functions in the documentation for
> more help.

select to_char(timestamp 'now', 'YYYY/MM/DD'); => 2002/05/24 Brilliant!

OK, I'm now pointing my local apache to serve up the postgres docs.
Sorry for taking up unnecessary bandwidth.

Cheers, Rory
--
Rory Campbell-Lange
<rory@campbell-lange.net>
<www.campbell-lange.net>

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Joel Burton"
Дата:
Сообщение: Re: auto update dates
Следующее
От: Tom Ansley
Дата:
Сообщение: Using CASE with a boolean value