Skip site navigation (1) Skip section navigation (2)

Re: Multiple -t options for pg_dump

From: Neil Conway <neilc(at)samurai(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Multiple -t options for pg_dump
Date: 2005-09-23 09:08:36
Message-ID: 1127466516.10986.1.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-patches
On Fri, 2005-23-09 at 00:14 -0700, David Fetter wrote: 
> Yes.  Please find enclosed round 2 of the patch.  It implements
> multiple -n's and multiple -t's, although I think it's broken for
> multiple -n's with no -t's.

BTW, have you read the (extensive) prior discussion of this topic? For
example,

http://archives.postgresql.org/pgsql-patches/2004-07/msg00229.php

There have been *at least* two previous implementations of the patch
posted, so it might be worth taking a look at those other versions as
well.

> Also included are a few wrapper functions for doing the right thing
> should any of calloc(), malloc(), realloc() and strdup() fail.

Can you post this as a separate patch, please? It is unrelated, and the
bulk of these changes make it difficult to review the "-t" option work.

*** src/bin/pg_dump/pg_dump.h   5 Sep 2005 23:50:49 -0000       1.121
--- src/bin/pg_dump/pg_dump.h   23 Sep 2005 07:13:02 -0000
***************
*** 387,390 ****
--- 387,395 ----
  extern CastInfo *getCasts(int *numCasts);
  extern void getTableAttrs(TableInfo *tbinfo, int numTables);
  
+ void *pg_calloc(size_t nmemb, size_t size);
+ void *pg_malloc(size_t size);
+ void *pg_realloc(void *ptr, size_t size);
+ char *pg_strdup(const char *s);

By convention, global function declarations use the "extern" keyword, so
you want:

extern void *pg_malloc(size_t sz);

etc.

-Neil



In response to

pgsql-patches by date

Next:From: Bruce MomjianDate: 2005-09-23 17:56:09
Subject: Re: Free WAL caches on switching segments
Previous:From: David FetterDate: 2005-09-23 07:14:03
Subject: Re: Multiple -t options for pg_dump

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group