pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nico <nicohmail-postgresql@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: making a rule and know when it is violated
Date: Mon, 21 Feb 2005 19:45:49 +0100
Message-ID: <cvdach$2hd4$1@news.hub.org> (raw)
References: <cvcvn4$bm0$1@news.hub.org>
	<87acpxlwkx.fsf@meuh.mnc.ch>

I don't know how to write it in postgresql.
"Guillaume Cottenceau" <gc@mnc.ch> schreef in bericht 
news:87acpxlwkx.fsf@meuh.mnc.ch...
> "Nico" <nicohmail-postgresql 'at' yahoo.com> writes:
>
>> Hello,
>> I want to make a rule in phpPgAdmin(PostgreSQL 7.3.8-RH ).
>> Then I want to intercept any violation on that rule in java.
>> Here is the table creation code:
>> CREATE TABLE "tblUser" (
>>     "UserID" serial NOT NULL,
>>     "UserName" character varying(50) NOT NULL,
>>     "UserPass" character varying(50) NOT NULL,
>>     "UserRoleID" integer DEFAULT 3 NOT NULL
>> );
>> Now it's imperative that the field UserRoleID has maximum one record that
>> contains the integer 1. Possible other values are 2 and 3. They are 
>> allowed
>> to exist in more than one record.
>> After that I need to know in java how to know when a violation of this 
>> rule
>> occurs.
>
> Why not using a trigger function in postgres?
>
> -- 
> Guillaume Cottenceau
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>      subscribe-nomail command to majordomo@postgresql.org so that your
>      message can get through to the mailing list cleanly
> 





view thread (7+ messages)  latest in thread

Message-ID: <cvdach$2hd4$1@news.hub.org>
Permalink:  ../cvdach$2hd4$1@news.hub.org/
Also on:    postgresql.org/message-id/cvdach$2hd4$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: nicohmail-postgresql@yahoo.com
  Subject: Re: making a rule and know when it is violated
  In-Reply-To: <cvdach$2hd4$1@news.hub.org>
  References: <cvcvn4$bm0$1@news.hub.org> <87acpxlwkx.fsf@meuh.mnc.ch> <cvdach$2hd4$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox