Re: Pg_dumpall

From: weigelt(at)metux(dot)de
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Pg_dumpall
Date: 2003-06-13 21:00:57
Message-ID: 20030613210057.GB15639@metux.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jun 13, 2003 at 02:20:45PM -0600, scott.marlowe wrote:

hi,

> I have the same thing in PHP if someone needs it. I wrote it originally
> to get around the limits of 7.3's pg_dumpall to hit against our 7.2
> production database, and then got carried away and did the same thing as
> you, made it dump them into seperate files.

i'd be more interested in an schema builder in php, which generates all
CREATE statements from an hash array structure, checks for results,
can cope with schema changes (i.e. field rename or fields added)
and reports problems.

i'm currently using such array structures for my database abstraction
layer, which handles whole objects (instead of relations), allows syncing, ...

$class_desc { CLSID_PERSON } = array
(
type => inode,
table => 'person',
properties => array
(
firstname => array ( type => text, not_null => 1 ),
lastname => array ( type => text, not_null => 1 ),
gender => array ( type => char ),
birth => array ( type => date ),
death => array ( type => date )
score => array ( type => integer )
),
unique_keys => array
(
array ( firstname => 1, lastname => 1 )
)
);

the generated schema now could look like this:

CREATE TABLE person
(
"firstname" text,
"lastname" text,
"gender" character,
"birth" date,
"death" date,
"score" integer
)
INHERITS ( "_inode" ); -- this comes from type="inode"

CREATE UNIQUE INDEX person_ui0 ON person ( inode_id );
CREATE UNIQUE INDEX person_ui1 ON person ( firstname, lastname );

...

cu
--
---------------------------------------------------------------------
Enrico Weigelt == metux ITS
Webhosting ab 5 EUR/Monat. UUCP, rawIP und vieles mehr.

phone: +49 36207 519931 www: http://www.metux.de/
fax: +49 36207 519932 email: contact(at)metux(dot)de
cellphone: +49 174 7066481 smsgate: sms(dot)weigelt(at)metux(dot)de
---------------------------------------------------------------------
Diese Mail wurde mit UUCP versandt. http://www.metux.de/uucp/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2003-06-13 21:03:17 Re: using sequences
Previous Message Bruno Wolff III 2003-06-13 20:58:13 Re: Index not being used in MAX function (7.2.3)