pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PASCAL CROZET <pascal.crozet@qualis-consulting.com>
To: PG-General Mailing List <pgsql-general@postgresql.org>
Subject: plpgsql copy import csv double quotes
Date: Wed, 9 Oct 2019 21:20:02 +0000
Message-ID: <453a8fd209f4444aacf7214b96c6eaa9@qualis-consulting.com> (raw)

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 - [cid:image002.png@01D57EF8.10B0A960] <http://www.qualis-consulting.com; Qualis Consulting<http://www.qualis-consulting.com/;
• www.qualis-consulting.com<http://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

Attachments:

31586B64B20C4E70AA403455AA402C62.png (image/png, 150B) download view image

view thread (6+ messages)  latest in thread

Message-ID: <453a8fd209f4444aacf7214b96c6eaa9@qualis-consulting.com>
Permalink:  ../453a8fd209f4444aacf7214b96c6eaa9@qualis-consulting.com/
Also on:    postgresql.org/message-id/453a8fd209f4444aacf7214b96c6eaa9@qualis-consulting.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: pascal.crozet@qualis-consulting.com
  Subject: Re: plpgsql copy import csv double quotes
  In-Reply-To: <453a8fd209f4444aacf7214b96c6eaa9@qualis-consulting.com>
  References: <453a8fd209f4444aacf7214b96c6eaa9@qualis-consulting.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox