[GENERAL] bug in 8.3? foreign key refers to different type

2008-02-26 Thread craigp
These create table commands succeed, even tho the foreign key refers to a 'different' type (int2 product_id column refers to an int8 column): CREATE TABLE products ( id int8 primary key, name text not null ); CREATE TABLE orders ( id int8 PRIMARY KEY, product_id int2 not null REF

[GENERAL] limitations of constraints, possible bugs

2006-08-16 Thread craigp
i'm curious about how constraints work (perhaps vs how they are supposed to work). for instance, if i create a domain (D) with some constraint, and create a table with a column of type D[], will that domain constraint be enforced for each element of the array? could i create a column constraint o

[GENERAL] sequences vs oids as primary keys

2006-07-24 Thread craigp
i had some questions/thoughts on using sequences vs oids as pks... it's a common requirement to obtain the last value of a sequence after an insert. most other databases support such a feature, but since oid's are deprecated, and only oid's are returned, this isn't supported by postgres (and perfor