From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Michael Satterwhite <michael(at)weblore(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Help with trigger |
Date: | 2010-12-27 21:36:35 |
Message-ID: | 5966.1293485795@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Michael Satterwhite <michael(at)weblore(dot)com> writes:
> On Monday, December 27, 2010 12:58:40 pm Guillaume Lelarge wrote:
>> Le 27/12/2010 18:57, Michael Satterwhite a crit :
>>> I'm obviously missing something ... and probably something obvious. Why
>>> is date2 still null?
>>
>> I'm not sure it'll help you. I copy/pasted your SQL script in my 9.0.2
>> release. Worked great.
> I'm running 8.4.2.
Well, as somebody already pointed out, the example you posted works
fine. When I try it in 8.4.6, I get
# select * from test;
date1 | date2
---------------------+---------------------
2012-05-04 00:00:00 | 2012-04-27 00:00:00
(1 row)
I find it interesting that your quoted result is
# select * from test;
date1 | date2
---------------------+-------
2012-04-27 00:00:00 |
(1 row)
What it looks like from here is there's a typo in the actually-executing
version of the function, such that date1 not date2 is assigned the
week-old date value. Perhaps "\df+ t_listing_startdate" would get
you started towards sorting it out.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Satterwhite | 2010-12-27 22:46:48 | Re: Help with trigger |
Previous Message | Guillaume Lelarge | 2010-12-27 21:34:15 | Re: Help with trigger |