From: | Timothy Perrigo <tperrigo(at)wernervas(dot)com> |
---|---|
To: | felix-lists-pgsql(at)crowfix(dot)com |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Confusion about inheritance -- NEVER MIND |
Date: | 2004-05-12 17:32:12 |
Message-ID: | 4DCB174C-A43A-11D8-A185-000A95C4F0A2@wernervas.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
As you've discovered, primary key constraints (and other constraints)
do not inherit, but perhaps something like the following will work for
you:
create table base (id serial primary key, (other fields to be
inherited...));
create table derived (new_field1 varchar(10), (other new fields...),
constraint derived_pkey primary key(id)) inherits base;
Hope this helps,
Tim
On May 12, 2004, at 11:16 AM, felix-lists-pgsql(at)crowfix(dot)com wrote:
> Well well, after I posted my request for help, I thought to search the
> mailing list archive, and lo! and behold! there was a discussion in
> December 2003 of the exact same problem, with the "resolution" that it
> is a design limitation, it may have been put on some request list, and
> it looks like I need to go back to individually defined tables or find
> some other workaround ...
>
> So unless someone has developed a patch for this for 7.4.2, I will now
> continue with my irregularly scheduled poking around and learning ...
>
> Thanks to everybody for PostgreSQL anyway :-)
>
> --
> ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
> Felix Finch: scarecrow repairman & rocket surgeon /
> felix(at)crowfix(dot)com
> GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR
> license #4933
> I've found a solution to Fermat's Last Theorem but I see I've run out
> of room o
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
From | Date | Subject | |
---|---|---|---|
Next Message | MaRCeLO PeReiRA | 2004-05-12 18:28:06 | Profiling PostgreSQL |
Previous Message | Bruno Wolff III | 2004-05-12 17:28:51 | Re: Washintonians and Oregonians |