Re: pg_restore COPY error handling

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: pg_restore COPY error handling
Дата
Msg-id 20060203025041.GW4474@ns.snowman.net
обсуждение исходный текст
Ответ на Re: pg_restore COPY error handling  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_restore COPY error handling  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> I agree.  I wonder if it wouldn't be cleaner to pass the information in
> the other direction, ie, send a boolean down to PrintTocData saying "you
> are sending SQL commands" or "you are sending COPY data".  Then, instead
> of depending only on the libpq state to decide what to do in
> ExecuteSqlCommandBuf, we could cross-check: if we're sending SQL data
> and the libpq state is wrong, just discard the line.

I believe the attached patch does this now.  Under my test case it
correctly handled things.  I'm certainly happier with it this way and
apologize for not realizing this better approach sooner.  Please
comment.

    Thanks!

        Stephen

Вложения

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [BUGS] BUG #2171: Differences compiling plpgsql in
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [BUGS] BUG #2171: Differences compiling plpgsql in ecpg