pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Struck <struck.d@retrovirology.lu>
To: Michael Glaesemann <grzm@myrealbox.com>
Cc: pgsql-php@postgresql.org
Subject: Re: Reducing duplicated business rules
Date: Sun, 9 Nov 2003 16:37:16 +0100
Message-ID: <20031109163716.08fed5de.struck.d@retrovirology.lu> (raw)
In-Reply-To: <714126A2-1082-11D8-B410-0005029FC1A7@myrealbox.com>
References: <20031106165210.6b46bbb7.struck.d@retrovirology.lu>
	<714126A2-1082-11D8-B410-0005029FC1A7@myrealbox.com>

> Interesting idea. Then you can include more specific information rather 
> than just the PostgreSQL error. I wonder if there wouldn't be a way to 
> use COMMENT information on the constraint as well_grab the COMMENT for 
> whatever named constraint caused it to fail.


I think for normal purposes, the name you can give a constraint should be sufficient.
Else one can think of giving an error number as a name for the constraint and keep the description of the error number in a different table.



> I don't know if this is the best way to do this, but it might be 
> workable in the short term. It would be nice to be able to ask the 
> database, in effect "Okay, yeah, that's not a good piece of data. But 
> let's assume that part were okay. Any other problems? Besides that?" 
> Then you could possibly get more feedback from the database.

True, that would be nice.
Maybe a mode where the database would should all the constraints and not one be one.

By the, this way of handling the format of the data makes your database more independent from a script language. In fact you could use it in perl, java, asp, etc. and don't have to rewrite the whole constraints for submitting data again.


Daniel

-- 
Retrovirology Laboratory Luxembourg
Centre Hospitalier de Luxembourg
4, rue E. Barblé
L-1210 Luxembourg

phone: +352-44116105
fax:   +352-44116113
web: http://www.retrovirology.lu
e-mail: struck.d@retrovirology.lu



view thread (10+ messages)  latest in thread

Message-ID: <20031109163716.08fed5de.struck.d@retrovirology.lu>
Permalink:  ../20031109163716.08fed5de.struck.d@retrovirology.lu/
Also on:    postgresql.org/message-id/20031109163716.08fed5de.struck.d@retrovirology.lu

 · 

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-php@postgresql.org
  Cc: struck.d@retrovirology.lu, grzm@myrealbox.com
  Subject: Re: Reducing duplicated business rules
  In-Reply-To: <20031109163716.08fed5de.struck.d@retrovirology.lu>
  References: <20031106165210.6b46bbb7.struck.d@retrovirology.lu> <714126A2-1082-11D8-B410-0005029FC1A7@myrealbox.com> <20031109163716.08fed5de.struck.d@retrovirology.lu>

* 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