[HACKERS] System Tables
Are the table structures of the System Tables changed often? Have they changed from v7.1.1 and v7.1.2? Peter -- +--- | Data Architect | your data; how you want it | http://www.codebydesign.com +--- ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[HACKERS] INHERIT
If I try to get the columns from pg_attribute using the oid of a child table created with INHERIT I get its columns AND all of its inherited columns. How do I just get the columns added by the child table? I figure I could check each column to see if they also exist in pg_attribute under a parent table but I figure there must be an easier/faster way? Another pg_* table perhaps? Besides; I am not certian this would work if there is a common column between a child and one of its parents (if that is even allowed)? As usual, any help would be greatly appreciated. Peter BTW: I checked pg_dump source and did not see an answer. -- +--- | Data Architect | your data; how you want it | http://www.codebydesign.com +--- ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl
Re: [HACKERS] linking hba.c
In trying to decide how to keep ODBC compilable standalone, I can't figure out how to get md5.c in there from backend/libpq. Is it crazy to put md5.c in interfaces/odbc and symlink it from there to backend/libpq and interfaces/libpq? I don't want to have two copies of md5.c but that may be another option. Opinions? Seems to me that a stand-alone driver would have to have its own md5.c otherwise you may as well start linking in all kinds of code from the distro. Of course that is what just about all other ODBC drivers do anyway. Peter ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [HACKERS] FOREIGN KEY after CREATE TABLE?
How can i add foreign keys after the CREATE TABLE? Is there some combination of other SQL commands that will do the trick? Peter, try ALTER TABLE a_table ADD CONSTRAINT ... FOREIGN KEY ... Grr I hate asking stupid questions. I scanned the ALTER TABLE syntax and somehow overlooked it. Thanks! Peter ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl
[HACKERS] Reverse Engineering
There seem to be several ways to get at just about anything in the Catalog Tables. The ODBC driver, psql, and pg_dump typically use slightly diff sql and you guys have suggested even better ways. Forgive me as I ask for more. How do I determine the foriegn keys in a table? I see pg_class.relfkeys and pg_class.relrefs. I am not sure what the diff is between the two. In anycase; where can I go to find the table/column(s) for each fk? Having this info will allow me to accurately connect the tables in the reverse engineered ERD. Very cool. Peter ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
[HACKERS] Reverse Engineering
Great progress today on my Reverse Engineering efforts. However; I have some comments. 1. How can I switch databases (where I would normally use USE)? 2. How do I determine the AccessMethod specified when an index was created? 3. It would be cool if the catalog objects had comments on them in pg_description. Very few do. Peter ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl
[HACKERS] query column def
Hi; I am reverse engineering a PostgreSQL database by querying catalog tables. I have run into a problem where I can not determine the exact info used in i.e. the CREATE TABLE statement. For example; how to determine the exact precision/length and scale used in a NUMERIC(p,s) column def. Looking at the PostgreSQL ODBC driver I see that it does some funky stuff such as reporting VARCHAR(maxlen) instead of i.e. VARCHAR(50) or whatever the column def was. So it appears that the author had similar problems. The result is that the ODBC driver does not appear to be absolutely accurate. Is this information availible somewhere in the catalog tables? Peter ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly