Re: Single row tables

From: "Dmitri Bichko" <dbichko(at)genpathpharma(dot)com>
To: KÖPFERL Robert <robert(dot)koepferl(at)sonorys(dot)at>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Single row tables
Date: 2005-01-11 14:50:11
Message-ID: 7A4ADADFC8AFF0478D47F63BEDD57CE33A339A@gpmail.gphq.genpathpharma.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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: pgsql-sql-owner(at)postgresql(dot)org [mailto:pgsql-sql-owner(at)postgresql(dot)org] On Behalf Of KÖPFERL Robert
Sent: Tuesday, January 11, 2005 9:46 AM
Cc: pgsql-sql(at)postgresql(dot)org
Subject: [SQL] Single row tables
Importance: High

Hi,

with what constraint or how can I ensure that one of my tables has exact one record or 0..1 records?

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Browse pgsql-sql by date

  From Date Subject
Next Message Kieran Ashley 2005-01-11 14:50:35 Re: Parsing a Calculation from a field
Previous Message KÖPFERL Robert 2005-01-11 14:45:36 Single row tables