[HACKERS] System Tables

2001-09-14 Thread Peter Harvey
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)

[HACKERS] INHERIT

2001-09-09 Thread Peter Harvey
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 paren

[HACKERS] Inherited Table

2001-09-06 Thread Peter Harvey
Anyone know how inherited tables are shown on an ERD... both the table and the connector (if any)? What I am looking for is how to draw this in the diagram. Peter -- +--- | Data Architect | your data; how you want it | http://www.codebydesign.com +--

Re: [HACKERS] FOREIGN KEY after CREATE TABLE?

2001-08-25 Thread Peter Harvey
> > 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 ... > I hate asking stupid questions. I scanned the ALTER TABLE syntax and somehow overlooked i

[HACKERS] FOREIGN KEY after CREATE TABLE?

2001-08-25 Thread Peter Harvey
How can i add foreign keys after the CREATE TABLE? Is there some combination of other SQL commands that will do the trick? My problem is; a. that I have a circular reference between 3 tables b. that I must be able to reverse engineer the resulting references in the shema by querying for foreign

Re: [HACKERS] linking hba.c

2001-08-25 Thread Peter Harvey
> 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 > ma

[HACKERS] Reverse Engineering

2001-08-23 Thread Peter Harvey
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.relfkey

[HACKERS] Reverse Engineering

2001-08-22 Thread Peter Harvey
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 p

[HACKERS] query column def

2001-08-21 Thread Peter Harvey
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