Hi,

Just stumbled upon this. Is it correct to conclude that foreign keys are not 
inherited from this text?

--------------------
phd=# create table perbookings(type smallint) inherits (bookings);
CREATE TABLE
phd=# \d perbookings;
                       Table "public.perbookings"
 Column |            Type             |            Modifiers
--------+-----------------------------+----------------------------------
 rid    | integer                     |
 uid    | integer                     |
 stime  | timestamp without time zone |
 etime  | timestamp without time zone |
 bid    | integer                     | default nextval('bid_seq'::text)
 type   | smallint                    |
Check constraints: "bookings_etime" (etime > stime)

phd=# \d bookings;
                         Table "public.bookings"
 Column |            Type             |            Modifiers
--------+-----------------------------+----------------------------------
 rid    | integer                     |
 uid    | integer                     |
 stime  | timestamp without time zone |
 etime  | timestamp without time zone |
 bid    | integer                     | default nextval('bid_seq'::text)
Check constraints: "bookings_etime" (etime > stime)
Foreign Key constraints: $1 FOREIGN KEY (rid) REFERENCES resource(id) ON 
UPDATE CASCADE ON DELETE CASCADE,
                         $2 FOREIGN KEY (uid) REFERENCES users(userid) ON 
UPDATE CASCADE ON DELETE CASCADE

phd=# select version();
                               version
---------------------------------------------------------------------
 PostgreSQL 7.3.2 on i386-portbld-freebsd4.7, compiled by GCC 2.95.4
(1 row)
--------------------

TIA..
 
 Shridhar

Wed, 19 Mar 2003 19:39:34 +0530
"Shridhar Daithankar<shridhar_daithankar@persistent.co.in>"
	<shridhar_daithankar@persistent.co.in>
Another naive question, inheritance and foreign key

On Wed, 19 Mar 2003, Shridhar Daithankar<shridhar_daithankar@persistent.co.in> wrote:

> Just stumbled upon this. Is it correct to conclude that foreign keys are not
> inherited from this text?

Yes. If you want more info, check out the archives.


Wed, 19 Mar 2003 07:25:02 -0800 (PST)
Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: Another naive question, inheritance and foreign key