RE RE: [SQL] Single row tables

2005-01-13 Thread KÖPFERL Robert
- there's however just an example for C. I don't want to engage the compiler :-/ > -Original Message- > From: sad [mailto:[EMAIL PROTECTED] > Sent: Mittwoch, 12. Jänner 2005 07:40 > To: KÖPFERL Robert > Cc: pgsql-sql@postgresql.org > Subject: Re: [SQL] Single row

Re: [SQL] Single row tables

2005-01-11 Thread sad
On Tuesday 11 January 2005 17:45, KÖPFERL Robert wrote: > Hi, > > with what constraint or how can I ensure that one of my tables has exact > one record or 0..1 records? A trigger procedure BEFORE INSERT would help you. And a column type with only one possible field value would help you if you de

Re: [SQL] Single row tables

2005-01-11 Thread KÖPFERL Robert
Sent: Dienstag, 11. Jänner 2005 15:50 > To: KÖPFERL Robert > Cc: pgsql-sql@postgresql.org > Subject: RE: [SQL] Single row tables > > > I suppose you could put a check constraint that forces a > single value on a column with a unique index? Or an insert > trigger that alway

Re: [SQL] Single row tables

2005-01-11 Thread Dmitri Bichko
I suppose you could put a check constraint that forces a single value on a column with a unique index? Or an insert trigger that always inserts the same value into a unique field. Out of curiosity, why do you need to do this? Dmitri -Original Message- From: [EMAIL PROTECTED] [mailto:[