Re: [GENERAL] constraining chars for all cols of a table

2011-02-18 Thread Susan Cassidy
> From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Gauthier, Dave > Sent: Friday, February 18, 2011 1:24 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] constraining chars for all cols of a table > Hi: > I have t

Re: [GENERAL] constraining chars for all cols of a table

2011-02-18 Thread David Johnston
Subject: RE: [GENERAL] constraining chars for all cols of a table Yes, I was doing that in the app that inserts/updates the records. But someone coming at this via direct sql would bypass the check in the app. :-( From: David Johnston [mailto:pol...@yahoo.com] Sent: Friday, February 18

Re: [GENERAL] constraining chars for all cols of a table

2011-02-18 Thread Gauthier, Dave
: RE: [GENERAL] constraining chars for all cols of a table I don't fully follow the issue or usage pattern. It may not be perfect database design but you should be most concerned with user generated data. If you are cascading within the database (or application) system and you have this ki

Re: [GENERAL] constraining chars for all cols of a table

2011-02-18 Thread David Johnston
8, 2011 4:51 PM To: David Johnston; pgsql-general@postgresql.org Subject: Re: [GENERAL] constraining chars for all cols of a table >>Restrict access to the table (for inserts) to a function that does the verification and then executes the insert in addition to any kind of logging and

Re: [GENERAL] constraining chars for all cols of a table

2011-02-18 Thread Gauthier, Dave
st of values with something like a regexp. Still looking :-) From: David Johnston [mailto:pol...@yahoo.com] Sent: Friday, February 18, 2011 4:42 PM To: Gauthier, Dave; pgsql-general@postgresql.org Subject: RE: [GENERAL] constraining chars for all cols of a table Restrict access to the table (for i

Re: [GENERAL] constraining chars for all cols of a table

2011-02-18 Thread David Johnston
vid J. From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Gauthier, Dave Sent: Friday, February 18, 2011 4:24 PM To: pgsql-general@postgresql.org Subject: [GENERAL] constraining chars for all cols of a table Hi: I have to constrain the cha

[GENERAL] constraining chars for all cols of a table

2011-02-18 Thread Gauthier, Dave
Hi: I have to constrain the chars used for table columns. For example... create table foo (col1 text, col2 text, col3 text); ... where col1 has to be all uppercase, nothing but [A-Z] col2 has to be all lowercase [a-z] plus [0-9] is also allowed col3 can be mixed case plus [0-9] and