Dear Tom,Here's the result of your queries:
template1=# set TimeZone TO 'PST8PDT';
SET
template1=# select abstime 'May 10, 1947 23:59:12'; abstime
------------------------1947-05-10 22:59:12-08
(1 row)
template1=# select (abstime 'May 10, 1947 23:59:12')::int4; int4
-------------714589248
(1 row)
--Bob
>
>
> "Robert E. Bruccoleri" <bruc@stone.congenomics.com> writes:
> > There are differences in the regression tests for PostgreSQL
> > 7.3b2 with handling of times before 1970. I recently sent out a set of
> > diffs for the changes. I've looked through the datetime.c code, but
> > it's not obvious to me what the cause of the change is. PostgreSQL 7.2
> > works fine on Irix for these cases.
>
> I have a feeling that it's got something to do with the workaround for
> broken mktime() that I recently put in. Could you try this experiment
> and see what you get? (This should at least tell us whether the
> variance from common behavior is on the input side or the output side.)
>
> regression=# set TimeZone TO 'PST8PDT';
> SET
> regression=# select abstime 'May 10, 1947 23:59:12';
> abstime
> ------------------------
> 1947-05-10 23:59:12-08
> (1 row)
>
> regression=# select (abstime 'May 10, 1947 23:59:12')::int4;
> int4
> ------------
> -714585648
> (1 row)
>
>
> regards, tom lane
>
+-----------------------------+------------------------------------+
| Robert E. Bruccoleri, Ph.D. | email: bruc@acm.org |
| P.O. Box 314 | URL: http://www.congen.com/~bruc |
| Pennington, NJ 08534 | |
+-----------------------------+------------------------------------+