[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-general
Subject: Re: [GENERAL] Thanks and questions...
From: Samuel Sieb <samuel () sieb ! net>
Date: 2000-07-29 1:53:02
[Download RAW message or body]
On Fri, Jul 28, 2000 at 06:53:41PM -0400, Tom Lane wrote:
> George Robinson II <george.robinson@eurekabroadband.com> writes:
> > What approach would be the most efficient way to accomplish this goal?
> > With what language or tools would you recommend? If I were to leave the
> > time as a int4, epoch time, what would the select look like to return
> > other time formats?
>
> Presently the easiest way to get from Unix time to a stored timestamp
> datum is to coerce to abstime first.
>
> regression=# insert into foo values(abstime(964824656));
>
> I don't think this'd work in the context of a COPY command,
> unfortunately, but it works fine in an INSERT.
>
> regards, tom lane
Would it maybe be easier to store in the table as int4, then coerce on the
way out. That way you could use copy.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic