Re: Tabbed data in tab-separated output

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Tabbed data in tab-separated output
Дата
Msg-id 20070104120535.GA31698@svana.org
обсуждение исходный текст
Ответ на Re: Tabbed data in tab-separated output  (felix@crowfix.com)
Список pgsql-general
On Thu, Jan 04, 2007 at 12:16:17AM -0800, felix@crowfix.com wrote:
> On Wed, Jan 03, 2007 at 10:31:46PM -0600, mike wrote:
> > How are you attempting to restore the table after using psql?  Psql
> > insert statements? Pgdump? COPY FROM?
>
> Actually, right now I feed the dump file into a program which mangles
> it and analyzes it in various ways.  It will eventually be fed into
> psql for restoration elsewhere.  The problem isn't restoring it.  It's
> not knowing how to tell which tabs are field separators and which are
> part of the data.

psql is prety dumb that way, being designed for people not programs. I
think recent versions will escape the tab.

I suggest you use \copy instead, which on recent versions will allow you
to copy from a query. Alternativly, use a delimiter that doesn't exist
in your data.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Bill Moran
Дата:
Сообщение: Re: could not open file xxxx for writing: Permission
Следующее
От: veejar
Дата:
Сообщение: LargeObjects Total Size