Search Postgresql Archives

Re: pg_dump without blobs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I understand that i cannot do a dump of a database without bytea
values.I hope that these feature would be present in next version of
pg_dump as we can store large binary values in these sort of fields
and pg_dump taking a lot of time for dumping the database.
For the moment, I will patch my database to transform my bytea field
into lo (oid) field.
I would to do something similar like this :

update table set new_field = oldfield

but i have problem with cast from bytea to oid.
Is there an efficient way of doing this update ?

Thank you,

Sébastien Boutté



On 7/16/07, Joshua D. Drake <jd@xxxxxxxxxxxxxxxxx> wrote:
Vivek Khera wrote:
>
> On Jul 16, 2007, at 9:26 AM, Francisco Reyes wrote:
>
>> I guess the next question is 'what does postgresql considers a blob'?
>> bytea fields? How about a large text with megabytes worth of data?
>
> bytea and text fields are NOT blobs.  they are what you access via the
> 'large object' functions.

To follow up on this.

In oracle large text CLOB and binary objects BLOB are synonomous (I
believe) with PostgreSQL TEXT and BYTEA.

PostgreSQL also supports a non standard, and frankly better
implementation called lo for binary data, which also uses BYTEA data but
breaks it up to make it more efficient per row.

There is no way to "not" dump your TEXT and BYTEA data from a particular
column if you are dumping the whole table.

One option would be to use CREATE TEMP TABLE AS SELECT... and then dump
that temp table.

Joshua D. Drake


>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faq
>


--

       === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive  PostgreSQL solutions since 1997
              http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux