From: | "Luke Lonergan" <llonergan(at)greenplum(dot)com> |
---|---|
To: | "Steve Atkins" <steve(at)blighty(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: NOLOGGING option, or ? |
Date: | 2005-06-02 03:35:57 |
Message-ID: | BEC3CCAD.6C60%llonergan@greenplum.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2005-06-02 03:41:29 | Re: NOLOGGING option, or ? |
Previous Message | Alon Goldshuv | 2005-06-02 03:35:48 | Re: NOLOGGING option, or ? |