Re: NOLOGGING option, or ?
Luke Lonergan <llonergan@greenplum.com>
From: "Luke Lonergan" <llonergan@greenplum.com>
To: "Steve Atkins" <steve@blighty.com>, pgsql-hackers@postgresql.org
Date: 2005-06-02T03:35:57Z
Lists: pgsql-hackers
Steve,
> I've been following this thread, and I'm a little confused. Could you
> possibly clarify what you mean, by providing a couple of lines of
> input as it would be formatted with escape processing turned off -
> containing a text field with an embedded newline and tab and a null field.
Using an extended command syntax for a "copy-like" command named LOAD:
LOAD [schema.]tablename [(column1,column2,...)]
FROM {'filename' | STDIN}
[ [WITH]
[DELIMITER [AS] 'delimiter']
[NULL [AS] 'null string']
[ESCAPE [AS] escape¹] ] ;
If you intend to support embedded newlines (0x0a) in your character data
without escapes, you will need to choose an alternative newline character
for formatting the data. An example that uses '0xaa' as the newline might
be:
Control statement:
LOAD webform (formdata) FROM /home/sample/sample.txt WITH DELIMITER |¹ NULL
¹ NEWLINE '0xaa';
Sample with 2 identical rows (with binary representations depicted between
<>):
Blahblah<0xaa>blahblah<0x09>blahblah<0x00>blahblah<0xaa>Blahblah<0xaa>blahbl
ah<0x09>blahblah<0x00>blahblah<0xaa>
- Luke