File: csv-newline.load

package info (click to toggle)
pgloader 3.6.10-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,060 kB
  • sloc: sql: 32,321; lisp: 14,793; makefile: 435; sh: 85; python: 26
file content (14 lines) | stat: -rw-r--r-- 431 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
LOAD CSV
    FROM INLINE
    INTO postgresql:///pgloader?lines (f1, f2, f3)
    WITH truncate,
         fields optionally enclosed by '"',
         fields escaped by double-quote,
         fields terminated by '¦',
         lines terminated by '¶'

  BEFORE LOAD DO
   $$ drop table if exists lines; $$,
   $$ create table if not exists lines (id serial, f1 text, f2 text, f3 text); $$;

plop¦bar¦foo¶plip¦second line¦bar¶