Re: [GENERAL] pg_dump without blobs

2007-07-20 Thread Sébastien Boutté
I think i've found a solution, i will do this : CREATE FUNCTION save_bytea_on_system(bytea) RETURNS varchar AS $$ use File::Temp (); $fh = new File::Temp(); binmode($fh); my $data = $_[0]; $data =~ s{\\(\\|[0-7]{3})}{$1 eq \\ ? $1 : chr(oct($1))}ge; $fname = $fh-filename;

Re: [GENERAL] pg_dump without blobs

2007-07-17 Thread Nis Jørgensen
Joshua D. Drake skrev: 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

Re: [GENERAL] pg_dump without blobs

2007-07-16 Thread Francisco Reyes
Sébastien Boutté writes: I try with options : -n public (without -b) but it's always the same, the dump is huge. According to the man page that should have done it: Note: Non-schema objects such as blobs are not dumped when -n is specified. You can add blobs back to the dump with the

Re: [GENERAL] pg_dump without blobs

2007-07-16 Thread Vivek Khera
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.

Re: [GENERAL] pg_dump without blobs

2007-07-16 Thread Joshua D. Drake
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

Re: [GENERAL] pg_dump without blobs

2007-07-16 Thread Sébastien Boutté
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

Re: [GENERAL] pg_dump without blobs

2007-07-16 Thread Francisco Reyes
Sébastien Boutté writes: I understand that i cannot do a dump of a database without bytea values. What version of postgresql? If 8.2 uou can do a copy to with a subselect copy (select with fields except bytea) to '/somepath'; ---(end of

Re: [GENERAL] pg_dump without blobs

2007-07-16 Thread Sébastien Boutté
I use version 8.2.4 since last week end in my production database. I don't want to do a per table dump (I have more than 300 tables). It's not maintainable as the schema evolves regulary. On 7/16/07, Francisco Reyes [EMAIL PROTECTED] wrote: Sébastien Boutté writes: I understand that i cannot

[GENERAL] pg_dump without blobs

2007-07-15 Thread Sébastien Boutté
Hi, I have a postgressql database with a table containing a bytea field. I would like to dump without this particulary field in order to improve dump and restore time. I try with options : -n public (without -b) but it's always the same, the dump is huge. How can i do that ? Do i have to