Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-11-13 Thread Guillaume Lelarge
2016-11-08 6:01 GMT+01:00 amul sul :

> On Tue, Nov 8, 2016 at 5:36 AM, Andreas Joseph Krogh 
> wrote:
> >
> >
> > I don't see what you mean. It forces dump of Blobs if we didn't use -B
> and
> > if we include everything in the dump, which seems good to me. What did
> you
> > try that didn't work as expected?
> >
> >
> > I guess what he means is that if -B is given, the following code sets
> > dopt.outputBlobs = false
> >
> > +case 'B':/* Don't dump blobs */
> > +dopt.outputBlobs = false;
> > +break;
> >
> >
> > Then this IF sets it back to TRUE:
> >
> > +if (dopt.include_everything && !dopt.schemaOnly &&
> !dopt.outputBlobs)
> >  dopt.outputBlobs = true;
> >
> >
> > ...making it impossible to turn off dumping of blobs.
> >
>
> Yes, thats the reason v4 patch  was not as expected.
>
>
It took me some time but I finally understand.

Behaviour fix in v6.


-- 
Guillaume.
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 371a614..a891b6e 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -145,6 +145,21 @@ PostgreSQL documentation
  
 
  
+  -B
+  --no-blobs
+  
+   
+Exclude large objects in the dump.
+   
+
+   
+When both -b and -B are given, the behavior
+is to output large objects.
+   
+  
+ 
+
+ 
   -c
   --clean
   
diff --git a/src/bin/pg_dump/pg_backup.h b/src/bin/pg_dump/pg_backup.h
index 0a28124..00ecde3 100644
--- a/src/bin/pg_dump/pg_backup.h
+++ b/src/bin/pg_dump/pg_backup.h
@@ -158,6 +158,7 @@ typedef struct _dumpOptions
 	int			outputClean;
 	int			outputCreateDB;
 	bool		outputBlobs;
+	bool		dontOutputBlobs;
 	int			outputNoOwner;
 	char	   *outputSuperuser;
 } DumpOptions;
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 4da297f..a91cbd9 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -291,6 +291,7 @@ main(int argc, char **argv)
 	static struct option long_options[] = {
 		{"data-only", no_argument, NULL, 'a'},
 		{"blobs", no_argument, NULL, 'b'},
+		{"no-blobs", no_argument, NULL, 'B'},
 		{"clean", no_argument, NULL, 'c'},
 		{"create", no_argument, NULL, 'C'},
 		{"dbname", required_argument, NULL, 'd'},
@@ -379,7 +380,7 @@ main(int argc, char **argv)
 
 	InitDumpOptions(&dopt);
 
-	while ((c = getopt_long(argc, argv, "abcCd:E:f:F:h:j:n:N:oOp:RsS:t:T:U:vwWxZ:",
+	while ((c = getopt_long(argc, argv, "abBcCd:E:f:F:h:j:n:N:oOp:RsS:t:T:U:vwWxZ:",
 			long_options, &optindex)) != -1)
 	{
 		switch (c)
@@ -392,6 +393,10 @@ main(int argc, char **argv)
 dopt.outputBlobs = true;
 break;
 
+			case 'B':			/* Don't dump blobs */
+dopt.dontOutputBlobs = true;
+break;
+
 			case 'c':			/* clean (i.e., drop) schema prior to create */
 dopt.outputClean = 1;
 break;
@@ -708,7 +713,7 @@ main(int argc, char **argv)
 	 * Dumping blobs is now default unless we saw an inclusion switch or -s
 	 * ... but even if we did see one of these, -b turns it back on.
 	 */
-	if (dopt.include_everything && !dopt.schemaOnly)
+	if (dopt.include_everything && !dopt.schemaOnly && !dopt.dontOutputBlobs)
 		dopt.outputBlobs = true;
 
 	/*
@@ -864,6 +869,7 @@ help(const char *progname)
 	printf(_("\nOptions controlling the output content:\n"));
 	printf(_("  -a, --data-only  dump only the data, not the schema\n"));
 	printf(_("  -b, --blobs  include large objects in dump\n"));
+	printf(_("  -B, --no-blobs   exclude large objects in dump\n"));
 	printf(_("  -c, --clean  clean (drop) database objects before recreating\n"));
 	printf(_("  -C, --create include commands to create database in dump\n"));
 	printf(_("  -E, --encoding=ENCODING  dump the data in encoding ENCODING\n"));

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-11-07 Thread amul sul
On Tue, Nov 8, 2016 at 5:36 AM, Andreas Joseph Krogh  wrote:
>
>
> I don't see what you mean. It forces dump of Blobs if we didn't use -B and
> if we include everything in the dump, which seems good to me. What did you
> try that didn't work as expected?
>
>
> I guess what he means is that if -B is given, the following code sets
> dopt.outputBlobs = false
>
> +case 'B':/* Don't dump blobs */
> +dopt.outputBlobs = false;
> +break;
>
>
> Then this IF sets it back to TRUE:
>
> +if (dopt.include_everything && !dopt.schemaOnly && !dopt.outputBlobs)
>  dopt.outputBlobs = true;
>
>
> ...making it impossible to turn off dumping of blobs.
>

Yes, thats the reason v4 patch  was not as expected.

Regards,
Amul Sul


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-11-07 Thread Andreas Joseph Krogh
På mandag 07. november 2016 kl. 22:01:41, skrev Guillaume Lelarge <
guilla...@lelarge.info >:
2016-11-07 7:06 GMT+01:00 amul sul mailto:sula...@gmail.com>>: On Mon, Nov 7, 2016 at 2:03 AM, Guillaume Lelarge
 mailto:guilla...@lelarge.info>> wrote:
 >>
 >> Agreed. I was afraid of that, but for some reason, didn't find that. I'll
 >> fix this.
 >
 >
 > Fixed in v4.
 >

 This fix is broken.

  70  -   if (dopt.include_everything && !dopt.schemaOnly)
  71 +   if (dopt.include_everything && !dopt.schemaOnly && !dopt.outputBlobs)
  72         dopt.outputBlobs = true;

 dopt.outputBlobs set to FALSE when option -B is specified and this IF
 condition reverts to TRUE which force to dump blobs.
    
I don't see what you mean. It forces dump of Blobs if we didn't use -B and if 
we include everything in the dump, which seems good to me. What did you try 
that didn't work as expected?



 
I guess what he means is that if -B is given, the following code 
sets dopt.outputBlobs = false
 
+            case 'B':            /* Don't dump blobs */
 +                dopt.outputBlobs = false;
 +                break;
  
 
Then this IF sets it back to TRUE:
 
+    if (dopt.include_everything && !dopt.schemaOnly && !dopt.outputBlobs)
          dopt.outputBlobs = true;
 
 
...making it impossible to turn off dumping of blobs.
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andr...@visena.com 
www.visena.com 




Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-11-07 Thread Guillaume Lelarge
2016-11-07 7:06 GMT+01:00 amul sul :

> On Mon, Nov 7, 2016 at 2:03 AM, Guillaume Lelarge
>  wrote:
> >>
> >> Agreed. I was afraid of that, but for some reason, didn't find that.
> I'll
> >> fix this.
> >
> >
> > Fixed in v4.
> >
>
> This fix is broken.
>
>  70  -   if (dopt.include_everything && !dopt.schemaOnly)
>  71 +   if (dopt.include_everything && !dopt.schemaOnly &&
> !dopt.outputBlobs)
>  72 dopt.outputBlobs = true;
>
> dopt.outputBlobs set to FALSE when option -B is specified and this IF
> condition reverts to TRUE which force to dump blobs.
>
>
I don't see what you mean. It forces dump of Blobs if we didn't use -B and
if we include everything in the dump, which seems good to me. What did you
try that didn't work as expected?

>>
> >>
> >>>
> >>> #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.
> >
>
> Such note exists for --table & --exclude-table option, see following
> lines in pg_dump.sgml
>
>  569
>  570 When both -t and -T are given, the
> behavior
>  571 is to dump just the tables that match at least one
> -t
>  572 switch but no -T switches.  If -T
> appears
>  573 without -t, then tables matching -T are
>  574 excluded from what is otherwise a normal dump.
>  575
>  576   
>
>
You're right on this. v5 fixes this.


-- 
Guillaume.
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 371a614..fb69d6d 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -145,6 +145,21 @@ PostgreSQL documentation
  
 
  
+  -B
+  --no-blobs
+  
+   
+Exclude large objects in the dump.
+   
+
+   
+When both -b and -B are given, the behavior
+is dependent on which option is last on the command line.
+   
+  
+ 
+
+ 
   -c
   --clean
   
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 0e20985..f90c074 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -137,6 +137,7 @@ InitDumpOptions(DumpOptions *opts)
 {
 	memset(opts, 0, sizeof(DumpOptions));
 	/* set any fields that shouldn't default to zeroes */
+	opts->outputBlobs = true;
 	opts->include_everything = true;
 	opts->dumpSections = DUMP_UNSECTIONED;
 }
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 4da297f..4d3e245 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -291,6 +291,7 @@ main(int argc, char **argv)
 	static struct option long_options[] = {
 		{"data-only", no_argument, NULL, 'a'},
 		{"blobs", no_argument, NULL, 'b'},
+		{"no-blobs", no_argument, NULL, 'B'},
 		{"clean", no_argument, NULL, 'c'},
 		{"create", no_argument, NULL, 'C'},
 		{"dbname", required_argument, NULL, 'd'},
@@ -379,7 +380,7 @@ main(int argc, char **argv)
 
 	InitDumpOptions(&dopt);
 
-	while ((c = getopt_long(argc, argv, "abcCd:E:f:F:h:j:n:N:oOp:RsS:t:T:U:vwWxZ:",
+	while ((c = getopt_long(argc, argv, "abBcCd:E:f:F:h:j:n:N:oOp:RsS:t:T:U:vwWxZ:",
 			long_options, &optindex)) != -1)
 	{
 		switch (c)
@@ -392,6 +393,10 @@ main(int argc, char **argv)
 dopt.outputBlobs = true;
 break;
 
+			case 'B':			/* Don't dump blobs */
+dopt.outputBlobs = false;
+break;
+
 			case 'c':			/* clean (i.e., drop) schema prior to create */
 dopt.outputClean = 1;
 break;
@@ -708,7 +713,7 @@ main(int argc, char **argv)
 	 * Dumping blobs is now default unless we saw an inclusion switch or -s
 	 * ... but even if we did see one of these, -b turns it back on.
 	 */
-	if (dopt.include_everything && !dopt.schemaOnly)
+	if (dopt.include_everything && !dopt.schemaOnly && !dopt.outputBlobs)
 		dopt.outputBlobs = true;
 
 	/*
@@ -864,6 +869,7 @@ help(const char *progname)
 	printf(_("\nOptions controlling the output content:\n"));
 	printf(_("  -a, --data-only  dump only the data, not the schema\n"));
 	printf(_("  -b, --blobs  include large objects in dump\n"));
+	printf(_("  -B, --no-blobs   exclude large objects in dump\n"));
 	printf(_("  -c, --clean  clean (drop) database objects before recreating\n"));
 	printf(_("  -C, --create include commands to create database in dump\n"));
 	printf(_("  -E, --encoding=ENCODING  dump the data in encoding ENCODING\n"));

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-11-06 Thread amul sul
On Mon, Nov 7, 2016 at 2:03 AM, Guillaume Lelarge
 wrote:
>>
>> Agreed. I was afraid of that, but for some reason, didn't find that. I'll
>> fix this.
>
>
> Fixed in v4.
>

This fix is broken.

 70  -   if (dopt.include_everything && !dopt.schemaOnly)
 71 +   if (dopt.include_everything && !dopt.schemaOnly && !dopt.outputBlobs)
 72 dopt.outputBlobs = true;

dopt.outputBlobs set to FALSE when option -B is specified and this IF
condition reverts to TRUE which force to dump blobs.

>>
>>
>>>
>>> #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.
>

Such note exists for --table & --exclude-table option, see following
lines in pg_dump.sgml

 569
 570 When both -t and -T are given, the behavior
 571 is to dump just the tables that match at least one -t
 572 switch but no -T switches.  If -T appears
 573 without -t, then tables matching -T are
 574 excluded from what is otherwise a normal dump.
 575
 576   

Regards,
Amul Sul


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-11-06 Thread Guillaume Lelarge
2016-11-04 9:35 GMT+01:00 Guillaume Lelarge :

> Hi Amul,
>
> 2016-11-04 7:52 GMT+01:00 amul sul :
>
>> 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
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 371a614..83dc52f 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -145,6 +145,16 @@ PostgreSQL documentation
  
 
  
+  -B
+  --no-blobs
+  
+   
+Exclude large objects in the dump.
+   
+  
+ 
+
+ 
   -c
   --clean
   
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 0e20985..f90c074 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -137,6 +137,7 @@ InitDumpOptions(DumpOptions *opts)
 {
 	memset(opts, 0, sizeof(DumpOptions));
 	/* set any fields that shouldn't default to zeroes */
+	opts->outputBlobs = true;
 	opts->include_everything = true;
 	opts->dumpSections = DUMP_UNSECTIONED;
 }
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 4da297f..4d3e245 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -291,6 +291,7 @@ main(int argc, char **argv)
 	static struct option long_options[] = {
 		{"data-only", no_argument, NULL, 'a'},
 		{"blobs", no_argument, NULL, 'b'},
+		{"no-blobs", no_argument, NULL, 'B'},
 		{"clean", no_argument, NULL, 'c'},
 		{"create", no_argument, NULL, 'C'},
 		{"dbname", required_argument, NULL, 'd'},
@@ -379,7 +380,7 @@ main(int argc, char **argv)
 
 	InitDumpOptions(&dopt);
 
-	while ((c = getopt_long(argc, argv, "abcCd:E:f:F:h:j:n:N:oOp:RsS:t:T:U:vwWxZ:",
+	while ((c = getopt_long(argc, argv, "abBcCd:E:f:F:h:j:n:N:oOp:RsS:t:T:U:vwWxZ:",
 			long_options, &optindex)) != -1)
 	{
 		switch (c)
@@ -392,6 +393,10 @@ main(int argc, char **argv)
 dopt.outputBlobs = true;
 break;
 
+			case 'B':			/* Don't dump blobs */
+dopt.outputBlobs = false;
+break;
+
 			case 'c':			/* clean (i.e., drop) schema prior to create */
 dopt.outputClean = 1;
 break;
@@ -708,7 +713,7 @@ main(int argc, char **argv)
 	 * Dumping blobs is now default unless we saw an inclusion switch or -s
 	 * ... but even if we did see one of these, -b turns it back on.
 	 */
-	if (dopt.include_everything && !dopt.schemaOnly)
+	if (dopt.include_everything && !dopt.schemaOnly && !dopt.outputBlobs)
 		dopt.outputBlobs = true;
 
 	/*
@@ -864,6 +869,7 @@ help(const char *progname)
 	printf(_("\nOptions controlling the output content:\n"));
 	printf(_("  -a, --data-only  dump only the data, not the schema\n"));
 	printf(_("  -b, --blobs  include large objects in dump\n"));
+	printf(_("  -B, --no-blobs   exclude large objects in dump\n"));
 	printf(_("  -c, --clean  clean (drop) database objects before recreating\n"));
 	printf(_("  -C, --create include commands to create database in dump\n"));
 	printf(_("  -E, --encoding=ENCODING  dump the data in encoding ENCODING\n"));

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-11-04 Thread Guillaume Lelarge
Hi Amul,

2016-11-04 7:52 GMT+01:00 amul sul :

> 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.


> #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'll try to work on this today but as I'm in pgconf.eu 2016, it may be only
for tomorrow.

Thank you.


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


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-11-03 Thread amul sul
Hi Guillaume,

I found following issues with this patch, sorry missed in previous post:

#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?

#2 :
We should add note for default behaviour if --no-blobs & --blobs both
are specified.

Regards,
Amul Sul


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-11-03 Thread Guillaume Lelarge
Hi,

2016-11-03 8:22 GMT+01:00 amul sul :

> Hi Guillaume,
>
> With your v2 patch, -B options working as expected but --no-blobs
> options is still unrecognized, this happens is because of you have
> forgot to add entry for 'no-blobs' in long_options[] array.
>
>
You're right. v3 (attached) fixes this.


> Apart from this concern patch looks good to me. Thanks
>
>
Thanks.


> Regards,
> Amul
>
> The new status of this patch is: Waiting on Author
>
> On Mon, Oct 24, 2016 at 12:19 AM, Guillaume Lelarge
>  wrote:
> > 2016-10-23 20:44 GMT+02:00 Guillaume Lelarge :
> >>
> >> 2016-10-23 20:37 GMT+02:00 Andreas Joseph Krogh :
> >>>
> >>> På søndag 23. oktober 2016 kl. 19:15:17, skrev Andreas Joseph Krogh
> >>> :
> >>>
> >>> På søndag 23. oktober 2016 kl. 17:06:57, skrev Guillaume Lelarge
> >>> :
> >>>
> >>> 2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh :
> 
>  På tirsdag 08. mars 2016 kl. 21:03:01, skrev David G. Johnston
>  :
> 
>  On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh
>   wrote:
> >
> > På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake
> > :
> >
> > On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
> > > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane
> > >  > > >:
> > >
> > > Andreas Joseph Krogh  writes:
> > >  > What I'm looking for is "inverse -b" in an otherwise
> complete
> > > dump. Any plans
> > >  > to add that?
> > >
> > > [ shrug... ]  Nobody ever asked for it before.
> > >
> > > regards, tom lane
> > >
> > > It surely helps testing production-datasets which contain lots of
> > > BLOBs
> > > where one wants to dump the production-data into a test-env. We
> have
> > >  >1TB databases containing > 95% blobs so it would help us
> > > tremendously
> > > to have this option.
> >
> > I have quite a few customers that would benefit from the ability to
> not
> > have blobs present in dumps.
> >
> >
> > Great! So how do we proceed to get "--no-blobs" added to pg_dump?
> > Maybe CommandPrompt and Visena should co-fund development of such an
> > addition, if it's accepted by -hackers?
> > We'd be willing to pay for such an addition for the 9.5 branch, as a
> > patch.
> 
> 
>  Unfortunately this doesn't qualify as a bug fix - it is a new feature
>  and thus is ineligible for inclusion in official 9.5
> 
>  David J.
> 
> 
>  Of course. That's why I mentioned that, if possible, an unofficial
> patch
>  to 9.5 could be developed, funded partly by Visena (my company).
> Given that
>  someone is willing to do this of course.
> 
> >>>
> >>>
> >>> That probably should look like the patch attached. It applies cleanly
> on
> >>> HEAD, and works AFAICT. If this patch seems interesting enough, I'll
> add it
> >>> to the next commit fest (note for myself, update the ref/pg_dump.sgml
> >>> documentation file).
> >>>
> >>> For Andreas' information, it also applies on 9.5, though I didn't check
> >>> if it worked afterwards.
> >>>
> >>>
> >>> +1 for adding it to the commitfest.
> >>>
> >>
> >>
> >> Done, https://commitfest.postgresql.org/11/833/
> >>
> >>> It's almost scary how simple this patch is and noone ever got around to
> >>> implement it.
> >>
> >>
> >> Nobody had the time (like me, till now) or the motivation.
> >>
> >>>
> >>>
> >>> Thanks, I'll test it on 9.5 soon.
> >>>
> >>>
> >>> It's totally OK for me to use 9.6 (now that it's released) to dump 9.5
> >>> DBs, so I'm all good with this patch, thanks!
> >>
> >>
> >> Remember that, if it gets commited, it'll be for next release (aka 10),
> >> and not 9.6 and earlier.
> >>
> >
> > New patch, this time with the documentation.
> >
> >
>



-- 
Guillaume.
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 371a614..83dc52f 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -145,6 +145,16 @@ PostgreSQL documentation
  
 
  
+  -B
+  --no-blobs
+  
+   
+Exclude large objects in the dump.
+   
+  
+ 
+
+ 
   -c
   --clean
   
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 4da297f..95c6ec7 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -291,6 +291,7 @@ main(int argc, char **argv)
 	static struct option long_options[] = {
 		{"data-only", no_argument, NULL, 'a'},
 		{"blobs", no_argument, NULL, 'b'},
+		{"no-blobs", no_argument, NULL, 'B'},
 		{"clean", no_argument, NULL, 'c'},
 		{"create", no_argument, NULL, 'C'},
 		{"dbname", required_argument, NULL, 'd'},
@@ -379,7 +380,7 @@ main(int argc, char **argv)
 
 	InitDumpOptions(&dopt);
 
-	while ((c = getopt_long(argc, argv, "abcCd:E:f:F:h:j:n:N:oOp:RsS:t:T:U:vwWxZ:",
+	while ((c = getopt_long(argc, argv, 

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-11-03 Thread amul sul
Hi Guillaume,

With your v2 patch, -B options working as expected but --no-blobs
options is still unrecognized, this happens is because of you have
forgot to add entry for 'no-blobs' in long_options[] array.

Apart from this concern patch looks good to me. Thanks

Regards,
Amul

The new status of this patch is: Waiting on Author

On Mon, Oct 24, 2016 at 12:19 AM, Guillaume Lelarge
 wrote:
> 2016-10-23 20:44 GMT+02:00 Guillaume Lelarge :
>>
>> 2016-10-23 20:37 GMT+02:00 Andreas Joseph Krogh :
>>>
>>> På søndag 23. oktober 2016 kl. 19:15:17, skrev Andreas Joseph Krogh
>>> :
>>>
>>> På søndag 23. oktober 2016 kl. 17:06:57, skrev Guillaume Lelarge
>>> :
>>>
>>> 2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh :

 På tirsdag 08. mars 2016 kl. 21:03:01, skrev David G. Johnston
 :

 On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh
  wrote:
>
> På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake
> :
>
> On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
> > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane
> >  > >:
> >
> > Andreas Joseph Krogh  writes:
> >  > What I'm looking for is "inverse -b" in an otherwise complete
> > dump. Any plans
> >  > to add that?
> >
> > [ shrug... ]  Nobody ever asked for it before.
> >
> > regards, tom lane
> >
> > It surely helps testing production-datasets which contain lots of
> > BLOBs
> > where one wants to dump the production-data into a test-env. We have
> >  >1TB databases containing > 95% blobs so it would help us
> > tremendously
> > to have this option.
>
> I have quite a few customers that would benefit from the ability to not
> have blobs present in dumps.
>
>
> Great! So how do we proceed to get "--no-blobs" added to pg_dump?
> Maybe CommandPrompt and Visena should co-fund development of such an
> addition, if it's accepted by -hackers?
> We'd be willing to pay for such an addition for the 9.5 branch, as a
> patch.


 Unfortunately this doesn't qualify as a bug fix - it is a new feature
 and thus is ineligible for inclusion in official 9.5

 David J.


 Of course. That's why I mentioned that, if possible, an unofficial patch
 to 9.5 could be developed, funded partly by Visena (my company). Given that
 someone is willing to do this of course.

>>>
>>>
>>> That probably should look like the patch attached. It applies cleanly on
>>> HEAD, and works AFAICT. If this patch seems interesting enough, I'll add it
>>> to the next commit fest (note for myself, update the ref/pg_dump.sgml
>>> documentation file).
>>>
>>> For Andreas' information, it also applies on 9.5, though I didn't check
>>> if it worked afterwards.
>>>
>>>
>>> +1 for adding it to the commitfest.
>>>
>>
>>
>> Done, https://commitfest.postgresql.org/11/833/
>>
>>> It's almost scary how simple this patch is and noone ever got around to
>>> implement it.
>>
>>
>> Nobody had the time (like me, till now) or the motivation.
>>
>>>
>>>
>>> Thanks, I'll test it on 9.5 soon.
>>>
>>>
>>> It's totally OK for me to use 9.6 (now that it's released) to dump 9.5
>>> DBs, so I'm all good with this patch, thanks!
>>
>>
>> Remember that, if it gets commited, it'll be for next release (aka 10),
>> and not 9.6 and earlier.
>>
>
> New patch, this time with the documentation.
>
>
> --
> Guillaume.
>   http://blog.guillaume.lelarge.info
>   http://www.dalibo.com
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-10-23 Thread Andreas Joseph Krogh
På søndag 23. oktober 2016 kl. 20:44:34, skrev Guillaume Lelarge <
guilla...@lelarge.info >:
[snip]
Remember that, if it gets commited, it'll be for next release (aka 10), and 
not 9.6 and earlier.



 
The patch working for 9.6 is fine for me, but getting this in master is of 
course the best.
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andr...@visena.com 
www.visena.com 
 


 


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-10-23 Thread Guillaume Lelarge
2016-10-23 20:44 GMT+02:00 Guillaume Lelarge :

> 2016-10-23 20:37 GMT+02:00 Andreas Joseph Krogh :
>
>> På søndag 23. oktober 2016 kl. 19:15:17, skrev Andreas Joseph Krogh <
>> andr...@visena.com>:
>>
>> På søndag 23. oktober 2016 kl. 17:06:57, skrev Guillaume Lelarge <
>> guilla...@lelarge.info>:
>>
>> 2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh :
>>>
>>> På tirsdag 08. mars 2016 kl. 21:03:01, skrev David G. Johnston <
>>> david.g.johns...@gmail.com>:
>>>
>>> On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh >> > wrote:
>>>
 På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
 j...@commandprompt.com>:

 On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
 > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane <
 t...@sss.pgh.pa.us
 > >:
 >
 > Andreas Joseph Krogh  writes:
 >  > What I'm looking for is "inverse -b" in an otherwise complete
 > dump. Any plans
 >  > to add that?
 >
 > [ shrug... ]  Nobody ever asked for it before.
 >
 > regards, tom lane
 >
 > It surely helps testing production-datasets which contain lots of
 BLOBs
 > where one wants to dump the production-data into a test-env. We have
 >  >1TB databases containing > 95% blobs so it would help us
 tremendously
 > to have this option.

 I have quite a few customers that would benefit from the ability to not
 have blobs present in dumps.


 Great! So how do we proceed to get "--no-blobs" added to pg_dump?
 Maybe CommandPrompt and Visena should co-fund development of such an
 addition, if it's accepted by -hackers?
 We'd be willing to pay for such an addition for the 9.5 branch, as a
 patch.

>>>
>>> ​Unfortunately this doesn't qualify as a bug fix - it is a new feature
>>> and thus is ineligible for inclusion in official 9.5
>>>
>>> David J.
>>>
>>>
>>> Of course. That's why I mentioned that, if possible, an unofficial patch
>>> to 9.5 could be developed, funded partly by Visena (my company). Given that
>>> someone is willing to do this of course.
>>>
>>>
>>
>> That probably should look like the patch attached. It applies cleanly on
>> HEAD, and works AFAICT. If this patch seems interesting enough, I'll add it
>> to the next commit fest (note for myself, update the ref/pg_dump.sgml
>> documentation file).
>>
>> For Andreas' information, it also applies on 9.5, though I didn't check
>> if it worked afterwards.
>>
>>
>> +1 for adding it to the commitfest.
>>
>>
>>
> Done, https://commitfest.postgresql.org/11/833/
>
> It's almost scary how simple this patch is and noone ever got around to
>> implement it.
>>
>>
> Nobody had the time (like me, till now) or the motivation.
>
>
>>
>> Thanks, I'll test it on 9.5 soon.
>>
>>
>> It's totally OK for me to use 9.6 (now that it's released) to dump 9.5
>> DBs, so I'm all good with this patch, thanks!
>>
>
> Remember that, if it gets commited, it'll be for next release (aka 10),
> and not 9.6 and earlier.
>
>
New patch, this time with the documentation.


-- 
Guillaume.
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 371a614..83dc52f 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -145,6 +145,16 @@ PostgreSQL documentation
  
 
  
+  -B
+  --no-blobs
+  
+   
+Exclude large objects in the dump.
+   
+  
+ 
+
+ 
   -c
   --clean
   
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 4da297f..dd93789 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -379,7 +379,7 @@ main(int argc, char **argv)
 
 	InitDumpOptions(&dopt);
 
-	while ((c = getopt_long(argc, argv, "abcCd:E:f:F:h:j:n:N:oOp:RsS:t:T:U:vwWxZ:",
+	while ((c = getopt_long(argc, argv, "abBcCd:E:f:F:h:j:n:N:oOp:RsS:t:T:U:vwWxZ:",
 			long_options, &optindex)) != -1)
 	{
 		switch (c)
@@ -392,6 +392,10 @@ main(int argc, char **argv)
 dopt.outputBlobs = true;
 break;
 
+			case 'B':			/* Don't dump blobs */
+dopt.include_everything = false;
+break;
+
 			case 'c':			/* clean (i.e., drop) schema prior to create */
 dopt.outputClean = 1;
 break;
@@ -864,6 +868,7 @@ help(const char *progname)
 	printf(_("\nOptions controlling the output content:\n"));
 	printf(_("  -a, --data-only  dump only the data, not the schema\n"));
 	printf(_("  -b, --blobs  include large objects in dump\n"));
+	printf(_("  -B, --no-blobs   exclude large objects in dump\n"));
 	printf(_("  -c, --clean  clean (drop) database objects before recreating\n"));
 	printf(_("  -C, --create include commands to create database in dump\n"));
 	printf(_("  -E, --encoding=ENCODING  dump the data in encoding ENCODING\n"));

-- 
Sent via pgsql-general mailing list (

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-10-23 Thread Guillaume Lelarge
2016-10-23 20:37 GMT+02:00 Andreas Joseph Krogh :

> På søndag 23. oktober 2016 kl. 19:15:17, skrev Andreas Joseph Krogh <
> andr...@visena.com>:
>
> På søndag 23. oktober 2016 kl. 17:06:57, skrev Guillaume Lelarge <
> guilla...@lelarge.info>:
>
> 2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh :
>>
>> På tirsdag 08. mars 2016 kl. 21:03:01, skrev David G. Johnston <
>> david.g.johns...@gmail.com>:
>>
>> On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh 
>> wrote:
>>
>>> På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
>>> j...@commandprompt.com>:
>>>
>>> On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
>>> > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane <
>>> t...@sss.pgh.pa.us
>>> > >:
>>> >
>>> > Andreas Joseph Krogh  writes:
>>> >  > What I'm looking for is "inverse -b" in an otherwise complete
>>> > dump. Any plans
>>> >  > to add that?
>>> >
>>> > [ shrug... ]  Nobody ever asked for it before.
>>> >
>>> > regards, tom lane
>>> >
>>> > It surely helps testing production-datasets which contain lots of BLOBs
>>> > where one wants to dump the production-data into a test-env. We have
>>> >  >1TB databases containing > 95% blobs so it would help us tremendously
>>> > to have this option.
>>>
>>> I have quite a few customers that would benefit from the ability to not
>>> have blobs present in dumps.
>>>
>>>
>>> Great! So how do we proceed to get "--no-blobs" added to pg_dump?
>>> Maybe CommandPrompt and Visena should co-fund development of such an
>>> addition, if it's accepted by -hackers?
>>> We'd be willing to pay for such an addition for the 9.5 branch, as a
>>> patch.
>>>
>>
>> ​Unfortunately this doesn't qualify as a bug fix - it is a new feature
>> and thus is ineligible for inclusion in official 9.5
>>
>> David J.
>>
>>
>> Of course. That's why I mentioned that, if possible, an unofficial patch
>> to 9.5 could be developed, funded partly by Visena (my company). Given that
>> someone is willing to do this of course.
>>
>>
>
> That probably should look like the patch attached. It applies cleanly on
> HEAD, and works AFAICT. If this patch seems interesting enough, I'll add it
> to the next commit fest (note for myself, update the ref/pg_dump.sgml
> documentation file).
>
> For Andreas' information, it also applies on 9.5, though I didn't check if
> it worked afterwards.
>
>
> +1 for adding it to the commitfest.
>
>
>
Done, https://commitfest.postgresql.org/11/833/

It's almost scary how simple this patch is and noone ever got around to
> implement it.
>
>
Nobody had the time (like me, till now) or the motivation.


>
> Thanks, I'll test it on 9.5 soon.
>
>
> It's totally OK for me to use 9.6 (now that it's released) to dump 9.5
> DBs, so I'm all good with this patch, thanks!
>

Remember that, if it gets commited, it'll be for next release (aka 10), and
not 9.6 and earlier.


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


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-10-23 Thread Andreas Joseph Krogh
På søndag 23. oktober 2016 kl. 19:15:17, skrev Andreas Joseph Krogh <
andr...@visena.com >:
På søndag 23. oktober 2016 kl. 17:06:57, skrev Guillaume Lelarge <
guilla...@lelarge.info >:
2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh mailto:andr...@visena.com>>: På tirsdag 08. mars 2016 kl. 21:03:01, skrev 
David G. Johnston mailto:david.g.johns...@gmail.com>>:
On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh mailto:andr...@visena.com>> wrote:
På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
j...@commandprompt.com >:
On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
 > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane mailto:t...@sss.pgh.pa.us>
 > >>:
 >
 >     Andreas Joseph Krogh mailto:andr...@visena.com>> 
writes:
 >      > What I'm looking for is "inverse -b" in an otherwise complete
 >     dump. Any plans
 >      > to add that?
 >
 >     [ shrug... ]  Nobody ever asked for it before.
 >
 >     regards, tom lane
 >
 > It surely helps testing production-datasets which contain lots of BLOBs
 > where one wants to dump the production-data into a test-env. We have
 >  >1TB databases containing > 95% blobs so it would help us tremendously
 > to have this option.

 I have quite a few customers that would benefit from the ability to not
 have blobs present in dumps.
 
Great! So how do we proceed to get "--no-blobs" added to pg_dump?
Maybe CommandPrompt and Visena should co-fund development of such an addition, 
if it's accepted by -hackers?
We'd be willing to pay for such an addition for the 9.5 branch, as a patch.
 
​Unfortunately this doesn't qualify as a bug fix - it is a new feature and 
thus is ineligible for inclusion in official 9.5

 

David J.




 


Of course. That's why I mentioned that, if possible, an unofficial patch to 
9.5 could be developed, funded partly by Visena (my company). Given that 
someone is willing to do this of course.
 


 
That probably should look like the patch attached. It applies cleanly on HEAD, 
and works AFAICT. If this patch seems interesting enough, I'll add it to the 
next commit fest (note for myself, update the ref/pg_dump.sgml documentation 
file).

 For Andreas' information, it also applies on 9.5, though I didn't check if it 
worked afterwards.



 
+1 for adding it to the commitfest.
 
It's almost scary how simple this patch is and noone ever got around to 
implement it.
 
Thanks, I'll test it on 9.5 soon.
 
It's totally OK for me to use 9.6 (now that it's released) to dump 9.5 DBs, so 
I'm all good with this patch, thanks!
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andr...@visena.com 
www.visena.com 
 


 


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-10-23 Thread Andreas Joseph Krogh
På søndag 23. oktober 2016 kl. 17:06:57, skrev Guillaume Lelarge <
guilla...@lelarge.info >:
2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh mailto:andr...@visena.com>>: På tirsdag 08. mars 2016 kl. 21:03:01, skrev 
David G. Johnston mailto:david.g.johns...@gmail.com>>:
On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh mailto:andr...@visena.com>> wrote:
På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
j...@commandprompt.com >:
On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
 > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane mailto:t...@sss.pgh.pa.us>
 > >>:
 >
 >     Andreas Joseph Krogh mailto:andr...@visena.com>> 
writes:
 >      > What I'm looking for is "inverse -b" in an otherwise complete
 >     dump. Any plans
 >      > to add that?
 >
 >     [ shrug... ]  Nobody ever asked for it before.
 >
 >     regards, tom lane
 >
 > It surely helps testing production-datasets which contain lots of BLOBs
 > where one wants to dump the production-data into a test-env. We have
 >  >1TB databases containing > 95% blobs so it would help us tremendously
 > to have this option.

 I have quite a few customers that would benefit from the ability to not
 have blobs present in dumps.
 
Great! So how do we proceed to get "--no-blobs" added to pg_dump?
Maybe CommandPrompt and Visena should co-fund development of such an addition, 
if it's accepted by -hackers?
We'd be willing to pay for such an addition for the 9.5 branch, as a patch.
 
​Unfortunately this doesn't qualify as a bug fix - it is a new feature and 
thus is ineligible for inclusion in official 9.5

 

David J.




 


Of course. That's why I mentioned that, if possible, an unofficial patch to 
9.5 could be developed, funded partly by Visena (my company). Given that 
someone is willing to do this of course.
 


 
That probably should look like the patch attached. It applies cleanly on HEAD, 
and works AFAICT. If this patch seems interesting enough, I'll add it to the 
next commit fest (note for myself, update the ref/pg_dump.sgml documentation 
file).

 For Andreas' information, it also applies on 9.5, though I didn't check if it 
worked afterwards.



 
+1 for adding it to the commitfest.
 
It's almost scary how simple this patch is and noone ever got around to 
implement it.
 
Thanks, I'll test it on 9.5 soon.
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andr...@visena.com 
www.visena.com 
 


 


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-10-23 Thread Guillaume Lelarge
2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh :

> På tirsdag 08. mars 2016 kl. 21:03:01, skrev David G. Johnston <
> david.g.johns...@gmail.com>:
>
> On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh 
> wrote:
>
>> På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
>> j...@commandprompt.com>:
>>
>> On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
>> > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane <
>> t...@sss.pgh.pa.us
>> > >:
>> >
>> > Andreas Joseph Krogh  writes:
>> >  > What I'm looking for is "inverse -b" in an otherwise complete
>> > dump. Any plans
>> >  > to add that?
>> >
>> > [ shrug... ]  Nobody ever asked for it before.
>> >
>> > regards, tom lane
>> >
>> > It surely helps testing production-datasets which contain lots of BLOBs
>> > where one wants to dump the production-data into a test-env. We have
>> >  >1TB databases containing > 95% blobs so it would help us tremendously
>> > to have this option.
>>
>> I have quite a few customers that would benefit from the ability to not
>> have blobs present in dumps.
>>
>>
>> Great! So how do we proceed to get "--no-blobs" added to pg_dump?
>> Maybe CommandPrompt and Visena should co-fund development of such an
>> addition, if it's accepted by -hackers?
>> We'd be willing to pay for such an addition for the 9.5 branch, as a
>> patch.
>>
>
> ​Unfortunately this doesn't qualify as a bug fix - it is a new feature and
> thus is ineligible for inclusion in official 9.5
>
> David J.
>
>
> Of course. That's why I mentioned that, if possible, an unofficial patch
> to 9.5 could be developed, funded partly by Visena (my company). Given that
> someone is willing to do this of course.
>
>

That probably should look like the patch attached. It applies cleanly on
HEAD, and works AFAICT. If this patch seems interesting enough, I'll add it
to the next commit fest (note for myself, update the ref/pg_dump.sgml
documentation file).

For Andreas' information, it also applies on 9.5, though I didn't check if
it worked afterwards.


-- 
Guillaume.
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 4da297f..dd93789 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -379,7 +379,7 @@ main(int argc, char **argv)
 
 	InitDumpOptions(&dopt);
 
-	while ((c = getopt_long(argc, argv, "abcCd:E:f:F:h:j:n:N:oOp:RsS:t:T:U:vwWxZ:",
+	while ((c = getopt_long(argc, argv, "abBcCd:E:f:F:h:j:n:N:oOp:RsS:t:T:U:vwWxZ:",
 			long_options, &optindex)) != -1)
 	{
 		switch (c)
@@ -392,6 +392,10 @@ main(int argc, char **argv)
 dopt.outputBlobs = true;
 break;
 
+			case 'B':			/* Don't dump blobs */
+dopt.include_everything = false;
+break;
+
 			case 'c':			/* clean (i.e., drop) schema prior to create */
 dopt.outputClean = 1;
 break;
@@ -864,6 +868,7 @@ help(const char *progname)
 	printf(_("\nOptions controlling the output content:\n"));
 	printf(_("  -a, --data-only  dump only the data, not the schema\n"));
 	printf(_("  -b, --blobs  include large objects in dump\n"));
+	printf(_("  -B, --no-blobs   exclude large objects in dump\n"));
 	printf(_("  -c, --clean  clean (drop) database objects before recreating\n"));
 	printf(_("  -C, --create include commands to create database in dump\n"));
 	printf(_("  -E, --encoding=ENCODING  dump the data in encoding ENCODING\n"));

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
På tirsdag 08. mars 2016 kl. 21:03:01, skrev David G. Johnston <
david.g.johns...@gmail.com >:
On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh mailto:andr...@visena.com>> wrote:
På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
j...@commandprompt.com >:
On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
 > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane mailto:t...@sss.pgh.pa.us>
 > >>:
 >
 >     Andreas Joseph Krogh mailto:andr...@visena.com>> 
writes:
 >      > What I'm looking for is "inverse -b" in an otherwise complete
 >     dump. Any plans
 >      > to add that?
 >
 >     [ shrug... ]  Nobody ever asked for it before.
 >
 >     regards, tom lane
 >
 > It surely helps testing production-datasets which contain lots of BLOBs
 > where one wants to dump the production-data into a test-env. We have
 >  >1TB databases containing > 95% blobs so it would help us tremendously
 > to have this option.

 I have quite a few customers that would benefit from the ability to not
 have blobs present in dumps.
 
Great! So how do we proceed to get "--no-blobs" added to pg_dump?
Maybe CommandPrompt and Visena should co-fund development of such an addition, 
if it's accepted by -hackers?
We'd be willing to pay for such an addition for the 9.5 branch, as a patch.
 
​Unfortunately this doesn't qualify as a bug fix - it is a new feature and 
thus is ineligible for inclusion in official 9.5

 

David J.




 
Of course. That's why I mentioned that, if possible, an unofficial patch to 
9.5 could be developed, funded partly by Visena (my company). Given that 
someone is willing to do this of course.
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andr...@visena.com 
www.visena.com 
 


 


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread David G. Johnston
On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh 
wrote:

> På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
> j...@commandprompt.com>:
>
> On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
> > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane  > >:
> >
> > Andreas Joseph Krogh  writes:
> >  > What I'm looking for is "inverse -b" in an otherwise complete
> > dump. Any plans
> >  > to add that?
> >
> > [ shrug... ]  Nobody ever asked for it before.
> >
> > regards, tom lane
> >
> > It surely helps testing production-datasets which contain lots of BLOBs
> > where one wants to dump the production-data into a test-env. We have
> >  >1TB databases containing > 95% blobs so it would help us tremendously
> > to have this option.
>
> I have quite a few customers that would benefit from the ability to not
> have blobs present in dumps.
>
>
> Great! So how do we proceed to get "--no-blobs" added to pg_dump?
> Maybe CommandPrompt and Visena should co-fund development of such an
> addition, if it's accepted by -hackers?
> We'd be willing to pay for such an addition for the 9.5 branch, as a patch.
>

​Unfortunately this doesn't qualify as a bug fix - it is a new feature and
thus is ineligible for inclusion in official 9.5

David J.


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
j...@commandprompt.com >:
On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
 > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane  >:
 >
 >     Andreas Joseph Krogh  writes:
 >      > What I'm looking for is "inverse -b" in an otherwise complete
 >     dump. Any plans
 >      > to add that?
 >
 >     [ shrug... ]  Nobody ever asked for it before.
 >
 >     regards, tom lane
 >
 > It surely helps testing production-datasets which contain lots of BLOBs
 > where one wants to dump the production-data into a test-env. We have
 >  >1TB databases containing > 95% blobs so it would help us tremendously
 > to have this option.

 I have quite a few customers that would benefit from the ability to not
 have blobs present in dumps.
 
Great! So how do we proceed to get "--no-blobs" added to pg_dump?
Maybe CommandPrompt and Visena should co-fund development of such an addition, 
if it's accepted by -hackers?
We'd be willing to pay for such an addition for the 9.5 branch, as a patch.
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andr...@visena.com 
www.visena.com 
 


 


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Joshua D. Drake

On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:

På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>:

Andreas Joseph Krogh  writes:
 > What I'm looking for is "inverse -b" in an otherwise complete
dump. Any plans
 > to add that?

[ shrug... ]  Nobody ever asked for it before.

regards, tom lane

It surely helps testing production-datasets which contain lots of BLOBs
where one wants to dump the production-data into a test-env. We have
 >1TB databases containing > 95% blobs so it would help us tremendously
to have this option.


I have quite a few customers that would benefit from the ability to not 
have blobs present in dumps.


JD


--
Command Prompt, Inc.  http://the.postgres.company/
+1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Everyone appreciates your honesty, until you are honest with them.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
På tirsdag 08. mars 2016 kl. 17:10:43, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>:
Andreas Joseph Krogh  writes:
 > P�� tirsdag 08. mars 2016 kl. 16:54:19, skrev Adrian Klaver <
 > adrian.kla...@aklaver.com >:
 >  Off hand I would say you are running pg_dump as a user that is not a
 >  superuser:

 > Yes, since when should I not be able to dump a DB (owned by a non-superuser)
 > as that user?

 The problem is that -t '*' is being interpreted as matching system
 catalogs.  You might be able to get somewhere with

 pg_dump -t '*' -N pg_catalog ...

 Probably we should fix pg_dump so it doesn't try to dump system catalogs
 as tables, even if the switches seem to ask it to.

 regards, tom lane
 
That didn't work either:
pg_dump -t '*' -N pg_catalog
 pg_dump: [archiver (db)] query failed: ERROR:  permission denied for relation 
pg_authid
 pg_dump: [archiver (db)] query was: LOCK TABLE pg_catalog.pg_authid IN ACCESS 
SHARE MODE

 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andr...@visena.com 
www.visena.com 
 


 


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Tom Lane
Andreas Joseph Krogh  writes:
> PÃ¥ tirsdag 08. mars 2016 kl. 16:54:19, skrev Adrian Klaver <
> adrian.kla...@aklaver.com >:
>  Off hand I would say you are running pg_dump as a user that is not a
>  superuser:

> Yes, since when should I not be able to dump a DB (owned by a non-superuser) 
> as that user?

The problem is that -t '*' is being interpreted as matching system
catalogs.  You might be able to get somewhere with

pg_dump -t '*' -N pg_catalog ...

Probably we should fix pg_dump so it doesn't try to dump system catalogs
as tables, even if the switches seem to ask it to.

regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Melvin Davidson
On Tue, Mar 8, 2016 at 11:02 AM, Andreas Joseph Krogh 
wrote:

> På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane :
>
> Andreas Joseph Krogh  writes:
> > What I'm looking for is "inverse -b" in an otherwise complete dump. Any
> plans
> > to add that?
>
> [ shrug... ]  Nobody ever asked for it before.
>
> regards, tom lane
>
>
> It surely helps testing production-datasets which contain lots of BLOBs
> where one wants to dump the production-data into a test-env. We have >1TB
> databases containing > 95% blobs so it would help us tremendously to have
> this option.
>
> --
> *Andreas Joseph Krogh*
> CTO / Partner - Visena AS
> Mobile: +47 909 56 963
> andr...@visena.com
> www.visena.com
> 
>
>

Probably you need to redesign the schema.

Move the blobs to a new/separate child table. Then you can exclude them.

-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>:
Andreas Joseph Krogh  writes:
 > What I'm looking for is "inverse -b" in an otherwise complete dump. Any 
plans
 > to add that?

 [ shrug... ]  Nobody ever asked for it before.

 regards, tom lane
 
It surely helps testing production-datasets which contain lots of BLOBs where 
one wants to dump the production-data into a test-env. We have >1TB databases 
containing > 95% blobs so it would help us tremendously to have this option.
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andr...@visena.com 
www.visena.com 
 


 


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
På tirsdag 08. mars 2016 kl. 16:54:19, skrev Adrian Klaver <
adrian.kla...@aklaver.com >:
On 03/08/2016 07:46 AM, Andreas Joseph Krogh wrote:
 > På tirsdag 08. mars 2016 kl. 16:30:36, skrev Tom Lane  >:
 >
 >     Andreas Joseph Krogh  writes:
 >      > P�� tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver <
 >      > adrian.kla...@aklaver.com >:
 >      >  Do you care about not dumping the pg_largeobject table or not
 >     dumping
 >      >  the data it contains?
 >      >
 >      > I have several tables with OID-columns and I'd like to dump my DB
 >     without any
 >      > data in pg_largeobject (> 95% of the space is occupied by data in
 >      > pg_largeobject).
 >      > I've tried to exclude (using -T) the tables containing
 >     OID-columns but
 >      > pg_largeobject is still dumped containing the data it seems.
 >
 >     A look at the pg_dump source code says that it skips blobs if any of
 >     -s, -n, -t are used.  There's a -b switch to undo that and include
 >     them anyway, but no "inverse -b" to skip them in an otherwise-complete
 >     dump.
 >
 >     So you could do something along the lines of pg_dump -t '*' ...
 >     although this will result in *all* non-schema-named objects being
 >     excluded, I believe, which might be a problem.
 >
 >     regards, tom lane
 >
 > Hm:
 > pg_dump -v -t '*' > andreak-noblob.dmp
 > pg_dump: reading extensions
 > pg_dump: identifying extension members
 > pg_dump: reading schemas
 > pg_dump: reading user-defined tables
 > pg_dump: [archiver (db)] query failed: ERROR:  permission denied for
 > relation pg_authid


 Off hand I would say you are running pg_dump as a user that is not a
 superuser:
 [snip]
 
Yes, since when should I not be able to dump a DB (owned by a non-superuser) 
as that user?
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andr...@visena.com 
www.visena.com 
 


 


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Tom Lane
Andreas Joseph Krogh  writes:
> What I'm looking for is "inverse -b" in an otherwise complete dump. Any plans 
> to add that?

[ shrug... ]  Nobody ever asked for it before.

regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Adrian Klaver

On 03/08/2016 07:46 AM, Andreas Joseph Krogh wrote:

På tirsdag 08. mars 2016 kl. 16:30:36, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>:

Andreas Joseph Krogh  writes:
 > P�� tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver <
 > adrian.kla...@aklaver.com >:
 >  Do you care about not dumping the pg_largeobject table or not
dumping
 >  the data it contains?
 >
 > I have several tables with OID-columns and I'd like to dump my DB
without any
 > data in pg_largeobject (> 95% of the space is occupied by data in
 > pg_largeobject).
 > I've tried to exclude (using -T) the tables containing
OID-columns but
 > pg_largeobject is still dumped containing the data it seems.

A look at the pg_dump source code says that it skips blobs if any of
-s, -n, -t are used.  There's a -b switch to undo that and include
them anyway, but no "inverse -b" to skip them in an otherwise-complete
dump.

So you could do something along the lines of pg_dump -t '*' ...
although this will result in *all* non-schema-named objects being
excluded, I believe, which might be a problem.

regards, tom lane

Hm:
pg_dump -v -t '*' > andreak-noblob.dmp
pg_dump: reading extensions
pg_dump: identifying extension members
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: [archiver (db)] query failed: ERROR:  permission denied for
relation pg_authid



Off hand I would say you are running pg_dump as a user that is not a 
superuser:


aklaver@panda:~> pg_dump -v -d test -U aklaver -t '*'
pg_dump: reading extensions
pg_dump: identifying extension members
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: [archiver (db)] query failed: ERROR:  permission denied for 
relation pg_authid
pg_dump: [archiver (db)] query was: LOCK TABLE pg_catalog.pg_authid IN 
ACCESS SHARE MODE



aklaver@panda:~> pg_dump -v -d test -U postgres -t '*'
pg_dump: reading extensions
pg_dump: identifying extension members
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
pg_dump: reading user-defined operators
pg_dump: reading user-defined operator classes
pg_dump: reading user-defined operator families
pg_dump: reading user-defined text search parsers
pg_dump: reading user-defined text search templates
pg_dump: reading user-defined text search dictionaries




pg_dump: [archiver (db)] query was: LOCK TABLE pg_catalog.pg_authid IN
ACCESS SHARE MODE
What I'm looking for is "inverse -b" in an otherwise complete dump. Any
plans to add that?
--
*Andreas Joseph Krogh*
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andr...@visena.com 
www.visena.com 




--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
På tirsdag 08. mars 2016 kl. 16:30:36, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>:
Andreas Joseph Krogh  writes:
 > P�� tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver <
 > adrian.kla...@aklaver.com >:
 >  Do you care about not dumping the pg_largeobject table or not dumping
 >  the data it contains?
 >
 > I have several tables with OID-columns and I'd like to dump my DB without 
any
 > data in pg_largeobject (> 95% of the space is occupied by data in
 > pg_largeobject).
 > I've tried to exclude (using -T) the tables containing OID-columns but
 > pg_largeobject is still dumped containing the data it seems.

 A look at the pg_dump source code says that it skips blobs if any of
 -s, -n, -t are used.  There's a -b switch to undo that and include
 them anyway, but no "inverse -b" to skip them in an otherwise-complete
 dump.

 So you could do something along the lines of pg_dump -t '*' ...
 although this will result in *all* non-schema-named objects being
 excluded, I believe, which might be a problem.

 regards, tom lane
 
Hm:
 
pg_dump -v -t '*' > andreak-noblob.dmp
 pg_dump: reading extensions
 pg_dump: identifying extension members
 pg_dump: reading schemas
 pg_dump: reading user-defined tables
 pg_dump: [archiver (db)] query failed: ERROR:  permission denied for relation 
pg_authid
 pg_dump: [archiver (db)] query was: LOCK TABLE pg_catalog.pg_authid IN ACCESS 
SHARE MODE
 
 
What I'm looking for is "inverse -b" in an otherwise complete dump. Any plans 
to add that?
 

-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andr...@visena.com 
www.visena.com 
 


 


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Tom Lane
Andreas Joseph Krogh  writes:
> PÃ¥ tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver <
> adrian.kla...@aklaver.com >:
>  Do you care about not dumping the pg_largeobject table or not dumping
>  the data it contains?
> 
> I have several tables with OID-columns and I'd like to dump my DB without any 
> data in pg_largeobject (> 95% of the space is occupied by data in 
> pg_largeobject).
> I've tried to exclude (using -T) the tables containing OID-columns but 
> pg_largeobject is still dumped containing the data it seems.

A look at the pg_dump source code says that it skips blobs if any of
-s, -n, -t are used.  There's a -b switch to undo that and include
them anyway, but no "inverse -b" to skip them in an otherwise-complete
dump.

So you could do something along the lines of pg_dump -t '*' ...
although this will result in *all* non-schema-named objects being
excluded, I believe, which might be a problem.

regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
På tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver <
adrian.kla...@aklaver.com >:
On 03/08/2016 01:53 AM, Andreas Joseph Krogh wrote:
 > Hi all.
 > Is there a way to exclude pg_largeobject from pg_dump? -T pg_largeobject
 > doesn't work. I've tried to exclude tables using OID-datatype also but
 > that didn't work either.

 Well pg_largeobject is a system catalog so pretty sure it cannot be
 excluded.

 What tables are you trying to exclude with OID?

 Do you care about not dumping the pg_largeobject table or not dumping
 the data it contains?
 
I have several tables with OID-columns and I'd like to dump my DB without any 
data in pg_largeobject (> 95% of the space is occupied by data in 
pg_largeobject).
I've tried to exclude (using -T) the tables containing OID-columns but 
pg_largeobject is still dumped containing the data it seems.
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andr...@visena.com 
www.visena.com 
 


 


Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Adrian Klaver

On 03/08/2016 01:53 AM, Andreas Joseph Krogh wrote:

Hi all.
Is there a way to exclude pg_largeobject from pg_dump? -T pg_largeobject
doesn't work. I've tried to exclude tables using OID-datatype also but
that didn't work either.


Well pg_largeobject is a system catalog so pretty sure it cannot be 
excluded.


What tables are you trying to exclude with OID?

Do you care about not dumping the pg_largeobject table or not dumping 
the data it contains?



Thanks.
--
*Andreas Joseph Krogh*
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andr...@visena.com 
www.visena.com 




--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general