Comments prefixed with DP _____________Original message ____________ Subject: Re: [pgadmin-hackers] Feature requests after crash Sender: Jean-Michel POURE <[EMAIL PROTECTED]> 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
