Re: Single Row Table?

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Single Row Table?
Дата
Msg-id 20040829213044.GA15047@wolff.to
обсуждение исходный текст
Ответ на Single Row Table?  ("Yateen Joshi" <yjoshi@starentnetworks.com>)
Ответы Re: Single Row Table?  ("Scott Marlowe" <smarlowe@qwest.net>)
Список pgsql-general
On Fri, Aug 27, 2004 at 13:32:07 +0530,
  Yateen Joshi <yjoshi@starentnetworks.com> wrote:
> Hi,
>
> I have got a table which is supposed to contain only one row. It does
> not have any primary keys defined.
> So, essentially, when a new insert happens in that table, I would like
> it (the insert) to fail if there is already a row existing in that
> table.
> How can I do that? Can I add any constraints? Or do I need to write a
> separate trigger for the same?

A simple way to force this is to add a primary key and a constraint
that forces the primary key to be a particular value.

В списке pgsql-general по дате отправления:

Предыдущее
От: Hervé Piedvache
Дата:
Сообщение: RSS Feeds are dead on Web site
Следующее
От: "Chris"
Дата:
Сообщение: malformed array literal in 8beta1