Tom Lane said:
COPY a FROM stdin WITH DELIMITER , QUOTE '' EQUOTE '';
EQUOTE for embedded quote.
ESCAPE would be better no? It's already a keyword ...
much better.
BTW, don't forget that the syntax options have to be provided in psql's
\copy as well. Did the patch cover that?
No,
Bruce Momjian said:
COPY tablename [ ( column [, ...] ) ]
TO { 'filename' | STDOUT }
[ [ WITH ]
[ BINARY ]
[ OIDS ]
[ DELIMITER [ AS ] 'delimiter' ]
[ NULL [ AS ] 'null string' ] ]
[
Andrew Dunstan wrote:
Bruce Momjian said:
COPY tablename [ ( column [, ...] ) ]
TO { 'filename' | STDOUT }
[ [ WITH ]
[ BINARY ]
[ OIDS ]
[ DELIMITER [ AS ] 'delimiter' ]
[ NULL [ AS ] 'null
Bruce Momjian said:
Andrew Dunstan wrote:
Bruce Momjian said:
COPY tablename [ ( column [, ...] ) ]
TO { 'filename' | STDOUT }
[ [ WITH ]
[ BINARY ]
[ OIDS ]
[ DELIMITER [ AS ] 'delimiter' ]
On Mon, Apr 12, 2004 at 02:26:14 -0400,
Andrew Dunstan [EMAIL PROTECTED] wrote:
a few points:
. in CSV mode, NULL should default to '' - that was in what I sent in.
Postgres normally treats an empty string as an empty string. Are you sure
you really want it to be treated as a NULL by
Dear Andrew,
I transfer some data from one server to the other. On such occasion, I
use my laptop to connect with server X, I download the data, then I
restore them to server Y. The versions on my laptop and both servers
are likely to be different. My laptop is likely to have some
Bruno Wolff III [EMAIL PROTECTED] writes:
On Mon, Apr 12, 2004 at 02:26:14 -0400,
Andrew Dunstan [EMAIL PROTECTED] wrote:
a few points:
. in CSV mode, NULL should default to '' - that was in what I sent in.
Postgres normally treats an empty string as an empty string. Are you sure
you
Andrew Dunstan wrote:
Tom Lane wrote:
Bruno Wolff III [EMAIL PROTECTED] writes:
On Mon, Apr 12, 2004 at 02:26:14 -0400,
Andrew Dunstan [EMAIL PROTECTED] wrote:
a few points:
. in CSV mode, NULL should default to '' - that was in what I sent in.
Postgres
On Mon, Apr 12, 2004 at 10:30:22 -0400,
Bruce Momjian [EMAIL PROTECTED] wrote:
It is my understanding that \N is a valid column value (no backslash
escape in CSV, right?), so we can't use it for NULL.
The only thing I can think of is for NULL to be:
,,
(no quotes) and a
Bruno Wolff III wrote:
On Mon, Apr 12, 2004 at 10:30:22 -0400,
Bruce Momjian [EMAIL PROTECTED] wrote:
It is my understanding that \N is a valid column value (no backslash
escape in CSV, right?), so we can't use it for NULL.
The only thing I can think of is for NULL to be:
,,
Bruce Momjian wrote:
It is my understanding that \N is a valid column value (no backslash
escape in CSV, right?), so we can't use it for NULL.
\ is not conventionally magical in CSVs in the general case. That
doesn't mean we couldn't use \N, but to me it would violate the
principle of least
Dear patchers,
Please find a attached a small patch that adds accessor functions
for aclitem so that it is not an opaque datatype.
I needed these functions to browse aclitems from user land. I can load
them when necessary, but it seems to me that these accessors for a backend
type belong to the
Andrew Dunstan wrote:
In fact, in the patch I sent in, no quoted string is marked as null when
being read (so even if you use \N as the null marker, \N will be that
literal and not a null marker). And the null marker, whatever it is,
should be made quote safe by us throwing an error if it
I have applied the following patch:
---
Change psql \copy stdin/stdout to read from command input/output.
Add pstdin/pstdout to read from psql's stdin/stdout.
BACKWARD INCOMPATIBLE CHANGE
--
Bruce Momjian
Patch applied with later socket.c file used. Thanks.
This is a major Win32 accomplishment.
---
Magnus Hagander wrote:
Here's an attempt at new socket and signal code for win32.
It works on the principle of turning
Bruce Momjian wrote:
Andrew Dunstan wrote:
In fact, in the patch I sent in, no quoted string is marked as null when
being read (so even if you use \N as the null marker, \N will be that
literal and not a null marker). And the null marker, whatever it is,
should be made quote safe by us
FYI, this CVS is turning into quite a job, but doing it right takes this
kind of effort.
---
Andrew Dunstan wrote:
Bruce Momjian wrote:
Andrew Dunstan wrote:
In fact, in the patch I sent in, no quoted string is
Fabien COELHO wrote:
Please find a attached a small patch that adds accessor functions
for aclitem so that it is not an opaque datatype.
I needed these functions to browse aclitems from user land. I can
load them when necessary, but it seems to me that these accessors for
a backend type
Andrew Dunstan wrote:
If the null marker is not an empty string, it gets an error, of
course - if it is it gets a null:
[EMAIL PROTECTED] pginst]$ echo ',,' | bin/psql -c create temp
table foo (a int, b text, c text); copy foo from stdin delimiter
',\' null 'N'; ERROR: invalid input
19 matches
Mail list logo