![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
The problem is, I don't want to use a lot of time to maintain this documentation, and above all, I'd prefer not to insert the information twice (read: a new constraint in the database should automagically update the documentation). |
#3
| |||
| |||
|
|
Hi ! I've just inherited the responsibility of a postgresql database of roughly 480 tables and 6460 columns, mainly without constraints, not even foreign keys. I'd like to make it a little more orthodox (lots and lots of constraints, yeah !!), but I need a tool to make a documentation about every column, at least, as some column are really vicious (like, they are a foreign key to a table which depends on the type of another column...). The best idea I could come with to do that was to maintain an output of pgdump --shema-only, versioned with cvs, annotated with a patch, itself versioned with cvs. Not that bright, isn't it ? The problem is, I don't want to use a lot of time to maintain this documentation, and above all, I'd prefer not to insert the information twice (read: a new constraint in the database should automagically update the documentation). Does somebody know the right way to do this ? Best regards, David Pradier -- dpradier (AT) apartia (DOT) fr - tel: 01.46.47.21.33 - fax: 01.45.20.17.98 ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend |
#4
| |||
| |||
|
|
The problem is, I don't want to use a lot of time to maintain this documentation, and above all, I'd prefer not to insert the information twice (read: a new constraint in the database should automagically update the documentation). It's a while since I've used them (just coming back to postgres after enforced exile in mysqlville) but last I checked: http://gborg.postgresql.org/project/dbutils/ Could generate UML diagrams from your DB. You might still be stuck diff-ing them when you change the db, but at least they're prettier than pg-dump. |
#5
| |||
| |||
|
|
In fact, I have already looked a little into the tables of PostgreSQL itself to see if I could hack it by adding a column "Comments" in the "table of columns". But I guess it isn't wise nor feasible, is it ? |
#6
| |||
| |||
|
|
On Thu, Nov 18, 2004 at 03:02:59PM +0000, Matt wrote: The problem is, I don't want to use a lot of time to maintain this documentation, and above all, I'd prefer not to insert the information twice (read: a new constraint in the database should automagically update the documentation). It's a while since I've used them (just coming back to postgres after enforced exile in mysqlville) but last I checked: http://gborg.postgresql.org/project/dbutils/ Could generate UML diagrams from your DB. You might still be stuck diff-ing them when you change the db, but at least they're prettier than pg-dump. Thanks for the link, it's interesting :-) Not totaly perfect, still : I'll have to modify the schema of the database a lot during the next months, so I'd prefer not to have to do a lots of diffing between the database description and the 'comments documentation'. Maybe the perfect solution doesn't exist yet ? |
#7
| |||
| |||
|
|
David Pradier wrote: In fact, I have already looked a little into the tables of PostgreSQL itself to see if I could hack it by adding a column "Comments" in the "table of columns". But I guess it isn't wise nor feasible, is it ? You are familiar with: COMMENT ON TABLE t IS 'this is my table'; And \d+ The comments get dumped with their associated object too. |
#8
| |||
| |||
|
|
I'd like to make it a little more orthodox (lots and lots of constraints, yeah !!), but I need a tool to make a documentation about every column, at least, as some column are really vicious (like, they are a foreign key to a table which depends on the type of another column...). |
#9
| |||
| |||
|
|
I've just inherited the responsibility of a postgresql database of roughly 480 tables and 6460 columns, mainly without constraints, not even foreign keys. I'd like to make it a little more orthodox (lots and lots of constraints, yeah !!), but I need a tool to make a documentation about every column, at least, as some column are really vicious (like, they are a foreign key to a table which depends on the type of another column...). The best idea I could come with to do that was to maintain an output of pgdump --shema-only, versioned with cvs, annotated with a patch, itself versioned with cvs. Not that bright, isn't it ? The problem is, I don't want to use a lot of time to maintain this documentation, and above all, I'd prefer not to insert the information twice (read: a new constraint in the database should automagically update the documentation). Does somebody know the right way to do this ? |
#10
| |||
| |||
|
|
Well, yes, that's what I currently use. The dot output is very interesting, but I guess the complete database image will be 16 meters x 16 meters large when I have finished adding the constraints. I have already stopped to print it. That's why I'd like to make something more 'paper-y' like 'The book of my database', with lots of comments. Or, I could insert the comments in the database itself so that autodoc auto-documents them :-) In fact, I have already looked a little into the tables of PostgreSQL itself to see if I could hack it by adding a column "Comments" in the "table of columns". But I guess it isn't wise nor feasible, is it ? |
![]() |
| Thread Tools | |
| Display Modes | |
| |