I have the following query which I would need to be able to use in
PostgreSQL. This basically limits the number of allowed rows in a
table to 8.
CREATE TRIGGER <TRIGGERNAME> ON [<TABLENAME>]
FOR INSERT AS
BEGIN DECLARE @<VARIABLENAME1> INT
SELECT <VARIABLENAME1> = COUNT (*) FROM <TABLENAME>
IF ( @<VARIABLENAME1>) > 8
BEGIN RAISERROR ('<ERROR MESSAGE>', 16, 1)
I've tried various combinations but none of them seem to work... any
help to convert this to PostgreSQL would be highly appreciated..
pgsql-novice by date
|Next:||From: Danjel Jungersen||Date: 2006-01-10 14:02:05|
|Subject: Re: Preventing access of user1 to user2's database|
|Previous:||From: Brendan Duddridge||Date: 2006-01-10 07:01:19|
|Subject: With auto vacuum, is analyze still necessary?|