On Nov 16, 2007, at 4:07 , Wolfgang Keller wrote:

But I am pathetically lazy >;->, so I ld like to save keystrokes and thus I had the (maybe pathetic)idea to use composite types for the composite primary (and foreign) keys. No luck again, it seems to me, as according to the documentation: "since no constraints are associated with a composite type, the constraints shown in the table definition do not apply to values of the composite type outside the table".

Note: "do not apply to values of the composite type outside of the table". Both primary keys and foreign keys are defined within tables, so AIUI this statement does not preclude you from using composite types as primary and foreign keys.

I'm sorry, but I'm apparently too dump to actually figure out myself whether this means that I can use a single composite type column as a primary / foreign key or whether not...?

What have you actually tried? You can learn a lot by a few minutes of exploration at a psql prompt.

Michael Glaesemann
grzm seespotcode net



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to