Search Postgresql Archives

Re: limit table to one row

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Merlin Moncure <mmoncure@xxxxxxxxx> writes:
> On Sat, Jun 6, 2009 at 2:07 PM, Tom Lane<tgl@xxxxxxxxxxxxx> wrote:
>> If you're willing to use a trigger, just insert the one allowed row
>> and then install a trigger that throws error for any insert or delete
>> attempt ...

> what if you need to delete then insert? :-)

Hmm ... I supposed the requirement was "always exactly one row".
If it's "always zero or one row", then you're right.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux