Thread: copy or create table for data logging?

copy or create table for data logging?

From
"John Smith"
Date:
guys,
i want to log some data everyday. for this i can do 1 of 2 things:

1) i can create an empty 'template' table and copy it everyday before
data logging including defaults.
# including constraints (thanks greg) doesn't work but more on that later.

helps-
i avoid spending more time on lengthy domain creation everyday (??).

hurts-
i have to share sequences between everyday tables (i can do away with
sequences but not sure on that).

2) i can simply create an identical table everyday and go on with data logging.

helps-
hmm, the smell of fresh new sequences everyday!

hurts-
i spend more time on creation (??).

either way i get the job done but what would you recommend? no
inheritance please since it couples and complicates. using 8.1.4.
jzs
http://developer.postgresql.org/pgdocs/postgres/sql-createtable.html