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

Re: Feature requests after crash

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: jm(dot)poure(at)freesurf(dot)fr, Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Feature requests after crash
Date: 2002-02-22 19:52:30
Message-ID: vLnychV0C4Mk.WJGxWBbj@mail.vale-housing.co.uk (view raw or flat)
Thread:
Lists: pgadmin-hackers
Comments prefixed with DP

_____________Original message ____________
Subject:	Re: [pgadmin-hackers] Feature requests after crash
Sender:	Jean-Michel POURE <jm(dot)poure(at)freesurf(dot)fr>
Date:		Fri, 22 Feb 2002 19:24:14 +0000

> my_sum(int4, int4)
> "My_Sum"(int4, int4)
> My_Sum(int4, int4)

Yes, but such a redundancy would be detected, which is ***better*** than 
nothing. We can then issue a warning instead of "blocking everything".

DP: We can't issue warnings only when the code thinks we should unless we're confident it'll be right all the time. Every time it gives a false negative there'll be a user swearing at the program because it didn't warn him of the dependency on the object he just dropped. At least now the user knows it's *always* his/her responsibility.

DP: That aside, the overhead just doing such a rudimentry check would huge. Before dropping any function you would have to check:

Every other function
Every view
Every trigger
Every rule
Every index
Every type
Every operator
Every aggregate 

That sort of overhead is just ridiculous.
 
Furthermore, many names are not case sensitive because of SQL (tables, 
views), which makes ILIKE the perfect solution to track dependencies : 
tables<->views, views<->functions, tables<->functions, etc...

DP: Huh? PostgreSQL identifiers *are* case sensitive if quoted (which they are in pgAdmin) - I beleive this is true for *all* object types.

+ we are only looking for one-level depencies.

DP: Yes, but I don't think that makes any difference.

I think we should add a warning before dropping language handlers and languages that have any defined functions and leave it at that. After all, Explorer won't stop you deleting kernel32.dll and the Gnome file manager won't stop you deleting /vmlinuz - we have to draw the line somewhere and leave things up to the user. It's not like we don't give them a warning first at all.

Regards, Dave


pgadmin-hackers by date

Next:From: Jean-Michel POUREDate: 2002-02-22 22:06:36
Subject: Triggers
Previous:From: Jean-Michel POUREDate: 2002-02-22 15:34:58
Subject: Update trigger name

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