Re: [PATCHES] Error in the date field (with NULL value...).Thanks!
Thomas Lockhart <lockhart@alumni.caltech.edu>
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
To: Maurizio Ortolan <crix98__@tin.it>
Cc: pgsql-hackers@postgresql.org, pgsql-sql@postgresql.org, pgsql-general@postgresql.org, pgsql-ports@postgresql.org, pgsql-admin@postgresql.org, pgsql-bugs@postgresql.org, pgsql-patches@postgresql.org
Date: 2001-03-30T06:22:21Z
Lists: pgsql-bugs, pgsql-hackers, pgsql-general
> How can I "binds" PostgreSQL to consider '' as null ?
You can modify src/backend/utils/{datetime,date,timestamp}.c to accept
an empty string as a null value. But imho it is better to fix this in
your input file, perhaps using sed:
sed "s/''/NULL/g" < informix.dump > pg.dump
- Thomas