Re: importing db as text files

Поиск
Список
Период
Сортировка
От expect
Тема Re: importing db as text files
Дата
Msg-id 20030815005303.17eb4c7d.expect@ihubbell.com
обсуждение исходный текст
Ответ на Re: importing db as text files  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Ответы Re: importing db as text files
Re: importing db as text files
Список pgsql-general
On Fri, 15 Aug 2003 00:32:01 -0700 (PDT)
Stephan Szabo <sszabo@megazone.bigpanda.com> wrote:

>
> On Thu, 14 Aug 2003, expect wrote:
>
> > On Thu, 14 Aug 2003 12:46:07 -0500
> > Bruno Wolff III <bruno@wolff.to> wrote:
> > > Note that it isn't obvious what empty strings should map to for numbers.
> > > NULL and 0 make about as much sense as using the default value.
> >
> > Well I'm new here but it seems to me they should map to the default value
> > for that column.   Why wouldn't they?
>
> One problem with doing that is that it's inconsistent.

Please elaborate.  How is it inconsistent, exactly?


>
> Given
> create table test(
>  a text default 'abc',
>  b int default 5
> );
>
> copy test from stdin with delimiter ',';
> ,
> \.
>
> What would you expect the values of the row in test
> to be?


Oh a test....

Does the \. end the STDIN input?

Where's the null option?  Don't you mean:

copy test from stdin with delimiter ',' null '';


In this case I would expect the row to have:

  a  |  b
----------
     |
 abc |  5


Is this too much to expect?


>
>
>

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: importing db as text files
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Character conversion issues while upgrading database