Re: Feature: give pg_dump a WHERE clause expression
Stephen Frost <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.devel.patches |
|---|---|
| Message-ID | <[email protected]> |
* Davy Durham ([email protected]) wrote: > No, the database I'm loading into is not PostgreSQL, but that's okay. I > think that was someone else. This gets back to the other question then- what database is it and does it support CSV or XML imports? > > Of course, on the other hand, you *could* use COPY to create SQL INSERT > > statements through an appropriately crafted query. PG makes that > > reasonably straight-forward, actually. This is an option too, of course.. select 'insert into XYZ VALUES (' || coalesce(quote_literal(col1),'NULL') || ',' || coalesce(quote_literal(col2),'NULL') || ');'; or so. I suppose it might be interesting to consider an 'insert-format' output for COPY, which pg_dump could possibly be refactored to use when requested. It'd be nice if it was easier to have COPY support more formats but right now it's kind of a pain. Stephen
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIQ1i5rzgMPqB3kigRAjGkAKCHcntaEf7XdMo0fllT5hRbJk3mQACbBzaF aLY2X8qz9efPnI79f40Iqg4= =QReh -----END PGP SIGNATURE-----