Re: pg_dump in 7.4

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump in 7.4
Date: 2002-11-13 19:53:28
Message-ID: 1037217210.18436.8.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Do we have a list of dependency data that we collect? eg. do we know about
> functions used in views and indexes? At this stage it's probably worth

> - constraints
> - sequences set (not really a dependency problem)
> - indexes
> - comments

I can make a complete list tonight of whats captured. Shall we tack
the list onto the end of section 3.13 (pg_depend):

http://developer.postgresql.org/docs/postgres/catalog-pg-depend.html

> For a table, it should be sufficient to know the constraints & types; we
> can add constraints later, but I'd be reluctant to get into doing 'ALTER
> TABLE ADD COLUMN...'.

Shouldn't ever need to do an ALTER TABLE ADD COLUMN. But I can
certainly come up with a case for ALTER TABLE SET DEFAULT.

> Indexes may have a function and/or a cast? Create Index I on T( cast(id as
> my_type) )?
>
> I'd guess constraints can depend on multiple tables, views(?), types, &
> functions. Not sure what else. We can't really break these down.

They can via functions. And you can break down a function and table,
but not really types or views.

CREATE FUNCTION func .... 'SELECT TRUE;' LANGUAGE 'sql';

CREATE <items requiring function>;

-- Fill in function body.
CREATE OR REPLACE FUNCTION func ... '<real query>' LANGUAGE 'sql';

> So it looks like the only contentious item might be table attrs? is that right?

More likely to be functions. As everything else (I can think of) is
easily altered into place.

--
Rod Taylor

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Schindler 2002-11-13 21:03:58 RI_FKey_check: foreign key constraint blocks parallel independent inserts
Previous Message Peter Eisentraut 2002-11-13 18:53:00 Re: RC1?