pgloader/test/csv-hstore.load
Dimitri Fontaine 31f8b5c5f0 Set application_name to 'pgloader' by default.
It's always been possible to set application_name to anything really,
making it easier to follow the PostgreSQL queries made by pgloader.
Force that setting to 'pgloader' by default.

Fix #387.
2016-04-11 17:14:38 +02:00

29 lines
643 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
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