Re: array must have even number of elements

2018-09-21 Thread Pavel Stehule
columns that I want to cleanse before inserting/updating. > > > The hstore function get parameters as sequence of pairs (key, value) - so > the number should be even. Odd parameter signalize broken format. > > Your example is pretty crazy - I cannot to decode it. Maybe you should to

Re: array must have even number of elements

2018-09-20 Thread Susan Hurst
at. > > Your example is pretty crazy - I cannot to decode it. Maybe you should to use > different function, I don't see a sense for using hstore type there. But I > cannot to decode it. > > Regards > > Pavel > >> Is there a workaround for this? >> >

Re: array must have even number of elements

2018-09-20 Thread Pavel Stehule
g hstore type there. But I cannot to decode it. Regards Pavel > > Is there a workaround for this? > > > ERROR: array must have even number of elements > > SQL state: 2202E > > Context: SQL statement "SELECT ($1 #= > hstore(array[trim(replace(regexp_replace($1.c,

array must have even number of elements

2018-09-20 Thread Susan Hurst
Why must an array have an even number of elements? I need to use a trigger function on any table, some of which may have an odd number of columns that I want to cleanse before inserting/updating. Is there a workaround for this? ERROR: array must have even number of elements SQL state