RE RE: Single row tables - Mailing list pgsql-sql

From KÖPFERL Robert
Subject RE RE: Single row tables
Date
Msg-id ED4E30DD9C43D5118DFB00508BBBA76EB16546@neptun.sonorys.at
Whole thread Raw
List pgsql-sql
The first seems like an appropriate solution. Fireing a trigger-function
that returns null.
If I however try to implement a function getnull in sql I fail. Defining the
trigger requests a function of type trigger while definition of a function
forbids using trigger as return type. So RTFM - there's however just an
example for C. I don't want to engage the compiler.... :-/

> -----Original Message-----
> From: sad [mailto:sad@bankir.ru]
> Sent: Mittwoch, 12. Jänner 2005 07:40
> To: KÖPFERL Robert
> Cc: pgsql-sql@postgresql.org
> Subject: Re: [SQL] Single row tables
>
>
> 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
> define UNIQUE INDEX on a field of this (user-defined) type.
>


pgsql-sql by date:

Previous
From: Dawid Kuroczko
Date:
Subject: Re: Columns into rows.
Next
From: Andrew Sullivan
Date:
Subject: Re: Syntax error while altering col-type