[GENERAL] push array to array

2016-09-18 Thread Tjibbe
I would like to push an array at the end of an array. Like: '{{4,5},{8,3}}' + '{3,6}' > '{{4,5},{8,3},{3,6}}' Is there an easy way to do? (i have version "9.1.23" on my shared hosting) Now I have written a complex function with EXECUTE command-string... CREATE OR REPLACE FUNCTION push_2d_ar

[GENERAL] Fwd: row_to_json() with numerical indices in stead of associative indices

2013-11-30 Thread Tjibbe
pair.value; END LOOP; RETURN to_json(_arr); END $$ language plpgsql; SELECT to_num_json( row_to_json((5, TRUE, 'string', NULL)) ); greetings Tjibbe

Re: [GENERAL] Fwd: row_to_json() with numerical indices in stead of associative indices

2013-12-01 Thread Tjibbe
like PL/phyton. -- +31 6 29401726 tji...@rijpma.org Jacobusstraat 185 3012 JM Rotterdam On 1 December 2013 06:43, Michael Paquier wrote: > On Sat, Nov 30, 2013 at 11:48 PM, Tjibbe wrote: > > Hello there, > > > > Is it possible to add an parameter for the function row_

[GENERAL] why VARIADIC functions executed on array input?

2014-02-19 Thread Tjibbe
functions are found on array input? In my opinion it makes no sense and the disadvantage is that overloading with a function like: CREATE OR REPLACE FUNCTION foo (anyarray) doesn't work. Greetings Tjibbe see example in: http://sqlfiddle.com/#!15/300e8/1 -- +31 6 29401726 tji...@rijpm

[GENERAL] create temp view from function inside plpgsql function.

2014-04-04 Thread Tjibbe
I have a plpgsql function with: PERFORM * FROM answers(_h);--works fine. CREATE TEMP VIEW answers AS SELECT * FROM answers(_h); --gives error... Why I get this error: ERROR: column \"_h\" does not exist\nLINE 1: ...TEMP VIEW answers AS SELECT * FROM antwoorden_view(_h) -- +31 6 29401726 tj

Re: [GENERAL] create temp view from function inside plpgsql function.

2014-04-04 Thread Tjibbe
Thanks that works! Little bit confusing ERROR. Regards Tjibbe -- +31 6 29401726 tji...@rijpma.org Jacobusstraat 185 3012 JM Rotterdam On 4 April 2014 11:43, Tjibbe wrote: > I have a plpgsql function with: > > > PERFORM * FROM answers(_h);--works fine. > CREATE TEMP

[GENERAL] column privileges

2006-10-09 Thread Tjibbe Rijpma
In postgresql privileges on colums is not possible, but is there a reason why not?   For my application I want the option to hide some columns for some users. So I use functions that make views for each user. Another solution may be to make a new table with a foreign key and an 1 to 1 relati