Search Postgresql Archives

Re: Inheritance and shared sequence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sebastjan Trepca wrote:
Hi,

as I understood, when you create a table which inherits some other
table, the constraints and indexes do not go to the child table hence
you have to create a separate ones in there. That means you cannot
depend that you won't have duplicate IDs in both tables. Right?

BUT...what if child table and parent table both use the same sequence
for the primary key. Would the duplication still be an issue?

Well, if you *always* use the sequence you'll be OK (until you run out of numbers), but it won't stop you manually supplying your own values.

--
  Richard Huxton
  Archonet Ltd


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux