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;
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
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 cann
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 broadcast)
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 datab
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 objec
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.
--
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
--blo
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 convert