Re: [GENERAL] Generic way to test input arguments

2016-10-18 Thread Pavel Stehule
2016-10-18 16:42 GMT+02:00 Saïd Assemlal : > I am writing database functions with plpgsql. (I am using Postgresql 9.4 > with centos 6) > > Here an example on what I would like to improve: > > CREATE OR REPLACE FUNCTION usp_locking_trial(p_trial_code VARCHAR(50), >

Re: [GENERAL] Generic way to test input arguments

2016-10-18 Thread oyoun
I will try to reproduce this way on postgresql9.4 Thanks Le 2016-10-17 à 3:30 PM, Pavel Stehule a écrit : Hi 2016-10-17 21:09 GMT+02:00 Raymond O'Donnell >: On 17/10/16 16:40, said assemlal wrote: Hello, I am looking for a way to

Re: [GENERAL] Generic way to test input arguments

2016-10-18 Thread Saïd Assemlal
I am writing database functions with plpgsql. (I am using Postgresql 9.4 with centos 6) Here an example on what I would like to improve: CREATE OR REPLACE FUNCTION usp_locking_trial(p_trial_code VARCHAR(50), p_trial_key VARCHAR(500)) RETURNS TEXT AS $$ DECLARE BEGIN IF

Re: [GENERAL] Generic way to test input arguments

2016-10-17 Thread Pavel Stehule
Hi 2016-10-17 21:09 GMT+02:00 Raymond O'Donnell : > On 17/10/16 16:40, said assemlal wrote: > >> Hello, >> >> I am looking for a way to test generically input arguments to raise an >> exception if one is either null or empty. >> >> I was thinking to create a function who takes an

Re: [GENERAL] Generic way to test input arguments

2016-10-17 Thread Raymond O'Donnell
On 17/10/16 16:40, said assemlal wrote: Hello, I am looking for a way to test generically input arguments to raise an exception if one is either null or empty. I was thinking to create a function who takes an array to check them but not sure if it's really good. It's not clear what you want

[GENERAL] Generic way to test input arguments

2016-10-17 Thread said assemlal
Hello, I am looking for a way to test generically input arguments to raise an exception if one is either null or empty. I was thinking to create a function who takes an array to check them but not sure if it's really good. What would be the best way to achieve that ? Thanks Saïd