[GENERAL] Importing data w/ Unix timestamp

2000-06-29 Thread brianb-pggeneral
I want to copy in some data from a tab-delimited flat file, but one of the columns that should translate into a datetime is in Unix timestamp format (seconds since epoch). The data should go into this table: create table logins ( uname varchar(100), timein datetime, duration int,

Re: [GENERAL] Importing data w/ Unix timestamp

2000-06-29 Thread brianb-pggeneral
[EMAIL PROTECTED] writes: I want to copy in some data from a tab-delimited flat file, but one of the columns that should translate into a datetime is in Unix timestamp format (seconds since epoch). The data should go into this table: create table logins ( uname varchar(100),

Re: [GENERAL] disk backups

2000-06-29 Thread Martijn van Oosterhout
Stephen Lawrence Jr. wrote: I think the way most people do that is to have pg_dump or pg_dumpall make a dump of the databases into the postgres directory each nite. That way, when you do a full disk backup, the database dumps would be backed up as well. Is there a better way? Here

Re: [GENERAL] Importing data w/ Unix timestamp

2000-06-29 Thread Tom Lane
[EMAIL PROTECTED] writes: I want to copy in some data from a tab-delimited flat file, but one of the columns that should translate into a datetime is in Unix timestamp format (seconds since epoch). COPY isn't going to apply any datatype conversions for you. What you could do, though, is

Re: [GENERAL] disk backups

2000-06-29 Thread Tom Lane
Martijn van Oosterhout [EMAIL PROTECTED] writes: Is there a better way? Here pg_dumping the DB takes over half an hour (mainly because pg_dump chews all available memory). pg_dump shouldn't be a performance hog if you are using the default COPY-based style of data export. I'd only expect

[GENERAL] NOTICE messages during table drop

2000-06-29 Thread kurt miller
Found these messages in the log this morning. Can anyone explain why? dropping tables for ucs... NOTICE: RegisterSharedInvalid: SI buffer overflow NOTICE: InvalidateSharedInvalid: cache state reset TIA, -km Get Your

Re: [GENERAL] NOTICE messages during table drop

2000-06-29 Thread Tom Lane
"kurt miller" [EMAIL PROTECTED] writes: Found these messages in the log this morning. Can anyone explain why? NOTICE: RegisterSharedInvalid: SI buffer overflow NOTICE: InvalidateSharedInvalid: cache state reset Probably this indicates that you had another backend somewhere that had been

[GENERAL] pg_dump/load quoting.

2000-06-29 Thread Bob Parkinson
Dear All, pg_dump is dumping INSERT commands that fail to reload. I'm putting stuff into a table using perl DBI; dbh-quote. A select shows a row like: 1047676 | 1047673 | CAB| breeders' associations pg_dump creates a line INSERT INTO "keywords" ("key","extkey","system","str") VALUES

Re: [GENERAL] Comments with embedded single quotes

2000-06-29 Thread Bruce Momjian
Richard Harvey Chapman [EMAIL PROTECTED] writes: Are single quotation marks not allowed in comments? test2=# /* John's cat is fat. */ test2'# test2'# '*/ test2-# ; ERROR: Unterminated quoted string test2=# They are, but it looks like psql's primitive parser is confused here.

Re: [GENERAL] Importing data w/ Unix timestamp

2000-06-29 Thread Thomas Lockhart
insert into RealTable select uname, timestamp(abstime(timeinAsInt4)), duration, etc from TempTable; Another side comment: afaik an explicit conversion to abstime is not required to go from Unix time to timestamp. So insert into RealTable select uname,