Re: Exclude pg_largeobject form pg_dump

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: amul sul <sulamul(at)gmail(dot)com>
Cc: Andreas Joseph Krogh <andreas(at)visena(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Exclude pg_largeobject form pg_dump
Date: 2016-11-06 20:33:20
Message-ID: CAECtzeWcrQvKCm=DqoaZ8+vUAU7a5k7M0-8Vs6x9CR-sCtvFoA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

2016-11-04 9:35 GMT+01:00 Guillaume Lelarge <guillaume(at)lelarge(dot)info>:

> Hi Amul,
>
> 2016-11-04 7:52 GMT+01:00 amul sul <sulamul(at)gmail(dot)com>:
>
>> Hi Guillaume,
>>
>> I found following issues with this patch, sorry missed in previous post:
>>
>>
> You don't have to be sorry for me doing shitty things :)
>
>
>> #1 :
>> 43 @@ -392,6 +393,10 @@ main(int argc, char **argv)
>> 44 dopt.outputBlobs = true;
>> 45 break;
>> 46
>> 47 + case 'B': /* Don't dump blobs */
>> 48 + dopt.include_everything = false;
>> 49 + break;
>> 50 +
>>
>> Touching dopt.include_everything flag does not seems to be a good idea
>> for '--no-blobs' option, our intension is to exclude blob only, but
>> this excluds other dump too (e.g COMMENT ON DATABASE, CREATE
>> EXTENSION, COMMENT ON EXTENSION, .., etc) that what we don't want,
>> right?
>>
>>
> Agreed. I was afraid of that, but for some reason, didn't find that. I'll
> fix this.
>

Fixed in v4.

>
>
>> #2 :
>> We should add note for default behaviour if --no-blobs & --blobs both
>> are specified.
>>
>>
> Right. I don't know how I will handle this, but you're right that the
> behaviour should be specified. I'll also fix this.
>
>
I checked other options, such as --format, and there's nothing noted as a
default behaviour. Last one wins, which is what this patch does.

> I'll try to work on this today but as I'm in pgconf.eu 2016, it may be
> only for tomorrow.
>
>
It tooks me more time than expected. v4 attached.

>

--
Guillaume.
http://blog.guillaume.lelarge.info
http://www.dalibo.com

Attachment Content-Type Size
noblobs_v4.patch text/x-patch 3.0 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Emrul 2016-11-07 01:12:54 Dynamic execution returning large result sets
Previous Message Adrian Klaver 2016-11-06 20:29:24 Re: timestamp without timezone to have timezone

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Scheid 2016-11-06 21:08:01 Fwd: Re: [CORE] temporal tables (SQL2011)
Previous Message Franck Verrot 2016-11-06 20:20:37 Re: Mention column name in error messages