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

Поиск
Список
Период
Сортировка
От Colin Rothnie
Тема FW: [SQL] Errors loading null dates in 7.0beta1
Дата
Msg-id E9EDEF4E768BD311BE0B00A0C9D4C42807B3F5@minxs1.tiwest.com.au
обсуждение исходный текст
Ответы Re: FW: [SQL] Errors loading null dates in 7.0beta1
Список 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





В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] Errors loading null dates in 7.0beta1
Следующее
От: Kyle Bateman
Дата:
Сообщение: Re: Casts in 7.0 vs 6.5 (was Re: [SQL] 7.0beta bug (or feature)?)