Обсуждение: Can't import date using copy

Поиск
Список
Период
Сортировка

Can't import date using copy

От
Guy Fraser
Дата:
Hi

I have tried reformatting dates in many ways but every thing I have
tried fails.

I used insert and update to create and change dates with different
styles and
was successful.

Is this a known bug?

Is their a fix for this bug?

or

Do I have to import date variables using insert/update statements?

I built the binaries from Redhat's postgresql-7.0.2-2.src.rpm package
and installed
all the binary packages that were built:

postgresql-7.0.2-2.i386.rpm
postgresql-devel-7.0.2-2.i386.rpm
postgresql-jdbc-7.0.2-2.i386.rpm
postgresql-odbc-7.0.2-2.i386.rpm
postgresql-perl-7.0.2-2.i386.rpm
postgresql-python-7.0.2-2.i386.rpm
postgresql-server-7.0.2-2.i386.rpm
postgresql-tcl-7.0.2-2.i386.rpm
postgresql-test-7.0.2-2.i386.rpm
postgresql-tk-7.0.2-2.i386.rpm

The reason I built the binaries from the source code, was because the
ftp server
at redhat was overloaded and was only lucky enough to get on after
numerous attempts.

I have been building using linux since 1995, and postgresql since 1997.

This is the first major problem I have had.

I have only requested help a couple of times, but do contribute to the
list on occasions.

Guy


Re: Can't import date using copy

От
Stephan Szabo
Дата:
On Fri, 27 Oct 2000, Guy Fraser wrote:

> Hi
> 
> I have tried reformatting dates in many ways but every thing I have
> tried fails.

I've been able to use copy to import date values in a simple test:
create table dt (a date);
copy dt from stdin;
01-12-2000
12-11-1999
\.

put the date values in fine.

What are you trying specifically, and what are you getting as an error?



Re: Can't import date using copy

От
Tom Lane
Дата:
Guy Fraser <guy@incentre.net> writes:
> I have tried reformatting dates in many ways but every thing I have
> tried fails.

As a rule, COPY will interpret incoming dates according to the current
setting of the DATESTYLE variable.  It'd help if you explained the date
format you are trying to read and mentioned which datestyles you've
tried to use ...
        regards, tom lane