pg_dump parameter

Started by Augusto Mossambaniover 4 years ago3 messagesgeneral
Jump to latest
#1Augusto Mossambani
augusto@accion.com.br

Hi.

Is there a way when using pg_dump, inform a parameter to "clean" a
certain column (ByteA) of a table, similar to oracle(Blob)? Oracle
Example: Remap_data=TABLE.COLUMN_NAME:clear_blob_pack.clear_blob

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: Augusto Mossambani (#1)
Re: pg_dump parameter

On Thursday, January 6, 2022, Augusto Mossambani <augusto@accion.com.br>
wrote:

Hi.

Is there a way when using pg_dump, inform a parameter to "clean" a certain column (ByteA) of a table, similar to oracle(Blob)?

Oracle Example:
Remap_data=TABLE.COLUMN_NAME:clear_blob_pack.clear_blob

Not that I’m aware of.

David J.

In reply to: David G. Johnston (#2)
Re: pg_dump parameter

Hi Augusto,

if you used lo (large object) instead of bytea, you could exclude those
large objects from the dump with the --no-blobs option of pg_dump.

Note that lo and bytea solve similar problems, but in markedly different
ways. For example, large objects are managed by functions, they are
stored outside of the table etc.

If you are using bytea, you might work around the issue in some ways.

For example, you may do a  CREATE TEMPORARY TABLE ... AS SELECT ...,
omit bytea columns in the select list, and dump the temporary table instead.

If you are dumping into plain-text file format with pg_dump, you may use
COPY (or \copy) instead, and only unload selected columns.

None of the above, however, is exactly what you want I am afraid.

Regards,

tamas

2022. 01. 06. 15:37 keltezéssel, David G. Johnston írta:

Show quoted text

On Thursday, January 6, 2022, Augusto Mossambani
<augusto@accion.com.br> wrote:

Hi.

Is there a way when using pg_dump, inform a parameter to "clean" a
certain column (ByteA) of a table, similar to oracle(Blob)? Oracle
Example: Remap_data=TABLE.COLUMN_NAME:clear_blob_pack.clear_blob

Not that I’m aware of.

 David J.