pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: KÖPFERL Robert <robert.koepferl@sonorys.at>
Cc: pgsql-sql@postgresql.org
Subject: Re: Single row tables
Date: Tue, 11 Jan 2005 16:17:06 +0100
Message-ID: <ED4E30DD9C43D5118DFB00508BBBA76EB1653B@neptun.sonorys.at> (raw)

Also I thought of an UNIQUE constraint on a column with =const constraint.
But .... 

It's for global configuration data that exists only once.
Making a key value thing was to weak typed for my taste.

> -----Original Message-----
> From: Dmitri Bichko [mailto:dbichko@genpathpharma.com]
> 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 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: <ED4E30DD9C43D5118DFB00508BBBA76EB1653B@neptun.sonorys.at>
Permalink:  ../ED4E30DD9C43D5118DFB00508BBBA76EB1653B@neptun.sonorys.at/
Also on:    postgresql.org/message-id/ED4E30DD9C43D5118DFB00508BBBA76EB1653B@neptun.sonorys.at

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: robert.koepferl@sonorys.at
  Subject: Re: Single row tables
  In-Reply-To: <ED4E30DD9C43D5118DFB00508BBBA76EB1653B@neptun.sonorys.at>
  References: <ED4E30DD9C43D5118DFB00508BBBA76EB1653B@neptun.sonorys.at>

* 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