Re: importing db as text files

From: Murthy Kambhampaty <murthy(dot)kambhampaty(at)goeci(dot)com>
To: 'expect' <expect(at)ihubbell(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: importing db as text files
Date: 2003-08-15 16:27:34
Message-ID: 2D92FEBFD3BE1346A6C397223A8DD3FC0923B0@THOR.goeci.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>-----Original Message-----
>From: expect [mailto:expect(at)ihubbell(dot)com]
>Sent: Friday, August 15, 2003 11:56
>To: pgsql-general(at)postgresql(dot)org
>Subject: Re: [GENERAL] importing db as text files
>
>
>On Fri, 15 Aug 2003 11:32:20 -0400
>Murthy Kambhampaty <murthy(dot)kambhampaty(at)goeci(dot)com> wrote:
>
>> On Friday, August 15, 2003 03:53, expect
>[mailto:expect(at)ihubbell(dot)com] wrote:
>> >On Fri, 15 Aug 2003 00:32:01 -0700 (PDT)
>> >Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> wrote:
>> >
>> ...
>> >> 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?
>> >
>> >
>> ...
>> >In this case I would expect the row to have:
>> >
>> > a | b
>> >----------
>> > |
>> > abc | 5
>> >
>> >
>> >Is this too much to expect?
>>
>> Your expectations don't seem consistent with the table
>definition, which
>> permits Null values are allowed in (it's ironic you would
>add "null ''" to
>> the copy statement, which says you want to treat empty
>strings as default
>> values, not null!).
>>
>
>
>Why is it ironic? I don't think you've followed the thread correctly.
>It's what I wanted to have happen.
>
Pardon my dyslexic typing; that was to read:
"it's ironic you would add "null ''" to the copy statement, which says you
want to treat empty strings as nulls, not default values!"

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2003-08-15 16:53:05 Re: [GENERAL] 7.4Beta
Previous Message Dennis Gearon 2003-08-15 16:14:35 Re: importing db as text files