pgloader/test/csv-hstore.load
Dimitri Fontaine 526fafb4b7 Allow quoting identifiers in db uri tablename.
As shown in #476, it is sometimes needed to be able to quote the
identifier names even when loading from a file, that is when specifying
the target table name in the database uri.

To that ends, allow the option "identifier case" to be used in the file
based cases too. Fixes #476.
2016-11-13 22:14:48 +01:00

30 lines
678 B
Fish

LOAD CSV
FROM INLINE
INTO postgresql://dim@localhost/pgloader?"HS"
WITH truncate,
fields terminated by '\t',
fields not enclosed,
fields escaped by backslash-quote,
quote identifiers
SET work_mem to '128MB',
standard_conforming_strings to 'on',
application_name to 'my app name'
BEFORE LOAD DO
$$ create extension if not exists hstore; $$,
$$ drop table if exists "HS"; $$,
$$ CREATE TABLE "HS"
(
id serial primary key,
kv hstore
)
$$;
1 email=>foo@example.com,a=>b
2 test=>value
3 a=>b,c=>"quoted hstore value",d=>other
4 baddata