Skip site navigation (1) Skip section navigation (2)

FW: [SQL] Errors loading null dates in 7.0beta1

From: Colin Rothnie <colinr(at)tiwest(dot)com(dot)au>
To: "'pgsql-sql(at)postgreSQL(dot)org'" <pgsql-sql(at)postgreSQL(dot)org>
Subject: FW: [SQL] Errors loading null dates in 7.0beta1
Date: 2000-03-08 09:12:43
Message-ID: E9EDEF4E768BD311BE0B00A0C9D4C42807B3F5@minxs1.tiwest.com.au (view raw or flat)
Thread:
Lists: pgsql-sql
> Tom Lane wrote:
> > FWIW, I don't see any obvious problem:
> 
> > regression=# create table foo (f1 int, f2 date);
> > CREATE
> > regression=# insert into foo values (42, null);
> > INSERT 686666 1
> > regression=# select * from foo;
> >  f1 | f2
> > ----+----
> >  42 |
> > (1 row)
> >
> >Can you be more specific about your problem?
> 
> Sorry about the ambiguity.
> I am copying data from a tab delimited text file using the psql command 
> test=> \copy collar from collar.txt;
> where the table "collar" contains a date field (not set to "NOT NULL") and
> the text file contains date fields for some records and nothing between
> two tabs for records without date data.  The same table structure and load
> file were used successfully with 6.5.3 (although I must admit that I
> haven't switched back to the old PostgreSQL to double check).
> 
> The table structure is as follows;
> DROP TABLE collar;
> CREATE TABLE collar (    
>     holeid        varchar(10) PRIMARY KEY,
>     easting       float8 NOT NULL,
>    northing       float8 NOT NULL,
>          rl       float8 NOT NULL CHECK (rl > 0),
>       depth       float8 NOT NULL,
>   basedepth       float8,
>        date       date,
>   starttime       time,
>     endtime       time,
>    location       varchar(30),
>   geologist       varchar(20),
>     driller       varchar(20),
>       rigid       varchar(10),
>    samplers       varchar(30),
>     company       varchar(10),
>     program       varchar(5),
>   loadbatch       int2
> );
> 
> Looking at it again now, I am also uncertain whether "date" is an
> allowable field name (PostrgreSQL didn't object).
> 
> Cheers
> Colin Rothnie
> 
> 
PS Sorry about the direct mail Tom, I hit the reply button without
confirming the addressee




Responses

pgsql-sql by date

Next:From: David CeljuskaDate: 2000-03-08 11:11:08
Subject: Re: [SQL] database with 1000000 rows is very slow
Previous:From: Tom LaneDate: 2000-03-08 08:36:31
Subject: Re: [SQL] Errors loading null dates in 7.0beta1

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group