OSDN Git Service

Depending on my interpreting (and programming) skills, this might solve
authorBruce Momjian <bruce@momjian.us>
Tue, 14 Dec 1999 00:08:21 +0000 (00:08 +0000)
committerBruce Momjian <bruce@momjian.us>
Tue, 14 Dec 1999 00:08:21 +0000 (00:08 +0000)
commitbcaabc5698f6b81a990f1bb7cfa3a6bb9583d03e
tree033e217115e218a514a6c33fc181a517649382cf
parenta82f9ffde6646624203c2d6a1f49e16088ef6b57
Depending on my interpreting (and programming) skills, this might solve
anywhere from zero to two TODO items.

* Allow flag to control COPY input/output of NULLs

I got this:
COPY table .... [ WITH NULL AS 'string' ]
which does what you'd expect. The default is \N, otherwise you can use
empty strings, etc. On Copy In this acts like a filter: every data item
that looks like 'string' becomes a NULL. Pretty straightforward.

This also seems to be related to

* Make postgres user have a password by default

If I recall this discussion correctly, the problem was actually that the
default password for the postgres (or any) user is in fact "\N", because
of the way copy is used. With this change, the file pg_pwd is copied out
with nulls as empty strings, so if someone doesn't have a password, the
password is just '', which one would expect from a new account. I don't
think anyone really wants a hard-coded default password.

Peter Eisentraut                  Sernanders väg 10:115
doc/src/sgml/ref/copy.sgml
src/backend/commands/copy.c
src/backend/commands/user.c
src/backend/parser/gram.y
src/backend/tcop/utility.c
src/include/commands/copy.h
src/include/nodes/parsenodes.h