pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
The date of an entry?
2+ messages / 2 participants
[nested] [flat]

* The date of an entry?
@ 1998-07-10 07:30  Johann Spies <jhspies@alpha.futurenet.co.za>
  0 siblings, 1 reply; 2+ messages in thread

From: Johann Spies @ 1998-07-10 07:30 UTC (permalink / raw)
  To: pgsql-sql

Is there a system field that can enable me to determine when an entry into
the database was made?  I see a reference to 'abstime'.  How can that be
accessed?

Johann.

 --------------------------------------------------------------------------
| Johann Spies                                 Windsorlaan 19              |
| jhspies@alpha.futurenet.co.za                3201 Pietermaritzburg       |
| Tel/Faks Nr. +27 331-46-1310		       Suid-Afrika (South Africa)  |
 --------------------------------------------------------------------------

     "Delight thyself also in the LORD; and he shall give
      thee the desires of thine heart."                
                                  Psalms 37:4 




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [SQL] The date of an entry?
@ 1998-07-11 16:15  Michael J Schout <mschout@gkg.net>
  parent: Johann Spies <jhspies@alpha.futurenet.co.za>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael J Schout @ 1998-07-11 16:15 UTC (permalink / raw)
  To: Johann Spies <jhspies@alpha.futurenet.co.za>; +Cc: pgsql-sql

Johann Spies wrote:
> 
> Is there a system field that can enable me to determine when an entry into
> the database was made?  I see a reference to 'abstime'.  How can that be
> accessed?

Abstime is a column type, just like datetime, date, or even int for that
matter.  Once upon a time, there used to be "time travel" in postgreSQL
so every row had a tmin,tmax field in it that would show the last time
the row was updated, but they are no longer  available as time travel
was removed in the interest of efficiency. You can get the same effect
by creating your own timestamp column though:

create table foo (ts timestamp default now(), f1 int);
insert into foo (f1) values (12345);
select * from foo;

ts                    |   f1
----------------------+-----
1998-07-11 11:10:37-05|12345
(1 row)


Regards,
Mike



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1998-07-11 16:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-07-10 07:30 The date of an entry? Johann Spies <jhspies@alpha.futurenet.co.za>
1998-07-11 16:15 ` Michael J Schout <mschout@gkg.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox