Dear Tom,

I thought about it... how to solve the contradiction:
 - backend vs external tool?
 - new interface? new command? unix? windows?
 - compatibility with old/existing interfaces?
 - plugins, any one can contribute?
 - don't bother DBA's
 - communicate about it?


My 2 pence idea of the day (for free):


CREATE SCHEMA pg_advisor;

CREATE VIEW pg_advisor.table_without_primary_keys
AS SELECT ... FROM pg_catalog...;
COMMENT ON VIEW pg_advisor.table_without_primary_keys
IS 'hey man, it is considered better to have a primary key on tables...';

CREATE VIEW pg_advisor.costly_ri_checks
AS ...

CREATE VIEW pg_advisor.summary AS
SELECT 'missing primary key declarations', COUNT(*)
FROM pg_advisor.table_without_primary_keys
UNION
SELECT 'costly referencial integrity checks...', COUNT(*)
FROM pg_advisor.costly_ri_checks
UNION
... ;


Then:
 - it is in the backend, somehow;-)
 - easy plugin: CREATE VIEW ...;;-)
 - anyone fluent in SQL and in pg_catalog can contribute!
 - ALL existing interfaces are already compatible;-)
   I can use psql;-);-)
 - no one has to look at the views if he does not want to.
 - you can communicate about it in the new release...
 - well, we're in a relationnal database, so let us stay there;-)

Good night,

-- 
Fabien Coelho - [EMAIL PROTECTED]

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to