On Fri, Jun 10, 2016 at 1:47 PM, Steve Atkins <st...@blighty.com> wrote:

>
> You could name the check constraints, catch the errors and use a
> client-side mapping between constraint name and a friendly error message
> for display in the web interface.
>
> This seems plausible, but not ideal.  I could get over the aesthetics of
sequence gaps, but don't like throwing lots of database errors on
principle, and also for silting up my logs.  Seems better to catch these
before submitting.



> You could implement the checks in PHP in the database.
> https://public.commandprompt.com/projects/plphp/wiki
>
> I'm aiming as much as possible for this to "just work" with standard
Postgres, and this approach gets away from that.  Plus people would have to
know SQL AND PHP in order to create tables.


> You could look at one of the existing SQL parsers implemented in PHP, and
> use those to parse the constraint to a tree from which you could easily
> pull PHP.
>
> This one sounds most promising!  I took a quick Google, and it looks like
there are lots of them, and a heavy Mysql focus.  Anyone have experience or
suggestions about which of these might be best, and particularly for
Postgres?

Thanks for the suggestions!

Ken


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



-- 
AGENCY Software
A Free Software data system
By and for non-profits
*http://agency-software.org/ <http://agency-software.org/>*
*https://agency-software.org/demo/client
<https://agency-software.org/demo/client>*
ken.tan...@agency-software.org
(253) 245-3801

Subscribe to the mailing list
<agency-general-requ...@lists.sourceforge.net?body=subscribe> to
learn more about AGENCY or
follow the discussion.

Reply via email to