Re: a bug, now(), default CURRENT_TIME, WAL Logs.

From: Jeff MacDonald <bignose(at)gmail(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: a bug, now(), default CURRENT_TIME, WAL Logs.
Date: 2005-10-06 15:57:53
Message-ID: f17daf040510060857n29bebac7q8c74d5dd40750d83@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Folks,

Well I think i had 'now' in there in someplaces and that got parsed.
I've fixed it in all databases on my system now, so doing forward I'm
safe.

However there is a 2 week period in which the dates for some items are
not what they should be. Of course they should be "now()" whenever now
was at the time, but they are all

2005-09-21 21:09:59.180154-04

I was wondering if there was a way I could use the WAL logs to find
what date certain oid's were inserted. Then query my table where date
= 2005-09-21 21:09:59.180154-04, corelate the time in teh WAL log and
update my table..

But I've no idea how to iteract with the wal log.

Thanks again folks.

> Could you have done something like:
>
>
> CREATE TABLE ts_def_test2(a int4, b timestamp with time zone default 'now');
>
> Which gives:
>
> CREATE TABLE ts_def_test2 (
> a integer,
> b timestamp with time zone DEFAULT '2005-10-05
> 00:08:05.381034+01'::timestamp with time zone
> );
>
> The difference being that 'now' is a literal timestamp (with timezone)
> that gets evaluated in your CREATE TABLE statement.

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-10-06 16:20:02 Re: Indexen on 8.0.3
Previous Message Guy Fraser 2005-10-06 15:56:33 Re: text file import