Re: Call for pg_dump testing - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Call for pg_dump testing
Date
Msg-id 3FD3EDD3.8040204@familyhealth.com.au
Whole thread Raw
In response to Re: Call for pg_dump testing  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Call for pg_dump testing  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> There's not currently any code for that, though I imagine we could
> invent some at need.  Please provide example cases.

create view v1 as select 1;
create view v2 as select 1 + (select * from v1);
create or replace view v1 as select * from v2;

It seems to me that the only way to solve that one is to dump 'view 
shells'.  eg. for text columns return '' and numeric columns return 0:

eg:

create view v1 as select 0::integer;
create view v2 as select 1 + (select * from v1);
create or replace view v1 as select * from v2;

>>Also, what happens if I delete a key dependency from my pg_depend table 
>>manually?
> 
> 
> Postgres has always allowed you to shoot yourself in the foot by
> manually diddling the system catalogs.  I place this in the "if it
> hurts, don't do it" category ...

Is there any reason for us to still allow that?  What is there left that 
requires manual twiddling?

Also shouldn't we really separate out the 'can modify catalogs manually' 
privilege from the 'superuser' privilege?

That way dbas could make people superusers who couldn't to extremely bad 
things to the catalogs?

Chris



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: aggregate + view + alias crash on 7.4 stable
Next
From: Tom Lane
Date:
Subject: Re: Build error?