RE RE: Single row tables

Поиск
Список
Период
Сортировка
От KÖPFERL Robert
Тема RE RE: Single row tables
Дата
Msg-id ED4E30DD9C43D5118DFB00508BBBA76EB16546@neptun.sonorys.at
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Dawid Kuroczko
Дата:
Сообщение: Re: Columns into rows.
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: Syntax error while altering col-type