pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dmitri Bichko <dbichko@genpathpharma.com>
To: KÖPFERL Robert <robert.koepferl@sonorys.at>
Cc: pgsql-sql@postgresql.org
Subject: Re: Single row tables
Date: Tue, 11 Jan 2005 09:50:11 -0500
Message-ID: <7A4ADADFC8AFF0478D47F63BEDD57CE33A339A@gpmail.gphq.genpathpharma.com> (raw)

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@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of KÖPFERL Robert
Sent: Tuesday, January 11, 2005 9:46 AM
Cc: pgsql-sql@postgresql.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



view thread (4+ messages)  latest in thread

Message-ID: <7A4ADADFC8AFF0478D47F63BEDD57CE33A339A@gpmail.gphq.genpathpharma.com>
Permalink:  ../7A4ADADFC8AFF0478D47F63BEDD57CE33A339A@gpmail.gphq.genpathpharma.com/
Also on:    postgresql.org/message-id/7A4ADADFC8AFF0478D47F63BEDD57CE33A339A@gpmail.gphq.genpathpharma.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dbichko@genpathpharma.com, robert.koepferl@sonorys.at
  Subject: Re: Single row tables
  In-Reply-To: <7A4ADADFC8AFF0478D47F63BEDD57CE33A339A@gpmail.gphq.genpathpharma.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox