plpgsql copy import csv double quotes

Поиск
Список
Период
Сортировка
От PASCAL CROZET
Тема plpgsql copy import csv double quotes
Дата
Msg-id 453a8fd209f4444aacf7214b96c6eaa9@qualis-consulting.com
обсуждение исходный текст
Ответы Re: plpgsql copy import csv double quotes  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: plpgsql copy import csv double quotes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general

Hi, MailingList

 

PG 9.3 under Ubuntu 14.04 (I know, that’s obsolete, but we’re planning to move to pg 10 or more during 2020)

I’ve experience issues with double quotes \34 inside fields, in a csv file.

 

Ex :

"value1","some text","other text with "double quotes" inside","last field"

 

When I import this line in a table, with the exact column number, with the « copy » command in plpgslq, the import fails.

Saying that too many fields are present. 

 

I tried to catch the double quotes and delete then, but that’s hard under AWK or sed

_________________________________

Cordialement, Pascal CROZET

DBA - Qualis Consulting

 www.qualis-consulting.com  04 78 22 74 90
 Le Bois des Côtes 1 – Bâtiment A
 300 Route Nationale 6 – 69760 LIMONEST
_________________________________

GRANT and REVOKE trigger on a ddl_command_end event trigger but don't provide any information beyond whether it was a table, schema, function, etc. that was affected. No object IDs or the like are included. How would you find out which table had its ACLs modified?

Also, why do grants and revokes have an object_type of 'TABLE' instead of lower case names like 'table' for all other event types?


Thanks,

Miles Elam

Вложения

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

Предыдущее
От: Miles Elam
Дата:
Сообщение: Event Triggers and GRANT/REVOKE
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: plpgsql copy import csv double quotes