Re: [GENERAL] CentOS 7.3, PostgreSQL 9.6.2, PHP 5.4 deliver array as string

2017-03-02 Thread Alexander Farber
And here is the table definition: words=> \d words_games; Table "public.words_games" Column | Type | Modifiers --+--+--- gid

Re: [GENERAL] CentOS 7.3, PostgreSQL 9.6.2, PHP 5.4 deliver array as string

2017-03-02 Thread Alexander Farber
Good morning, it looks that I failed to provide sufficient information in the first mail, sorry. Here again my problem - here is my PHP script: const SQL_GET_BOARD = ' SELECT out_bid AS bid, out_letters AS letters, out_values AS values FROMwords_get_board(?)

Re: [GENERAL] CentOS 7.3, PostgreSQL 9.6.2, PHP 5.4 deliver array as string

2017-03-02 Thread rob stone
Hi Alex, On Thu, 2017-03-02 at 21:45 +0100, Alexander Farber wrote: > Good evening! > > I am calling this stored function -  > > CREATE OR REPLACE FUNCTION words_get_board( >                 in_gid integer >         ) RETURNS TABLE ( >                 out_bid integer, >                 out_lette

Re: [GENERAL] CentOS 7.3, PostgreSQL 9.6.2, PHP 5.4 deliver array as string

2017-03-02 Thread Adrian Klaver
On 03/02/2017 01:30 PM, Alexander Farber wrote: Adrian, but the stored function works, I am just not happy that the results are casted to strings by PHP... and wonder hpw to fix or workaround this. So what is the result when you run the function in psql? Also if I am following correctly should

Re: [GENERAL] CentOS 7.3, PostgreSQL 9.6.2, PHP 5.4 deliver array as string

2017-03-02 Thread Thomas Kellerer
Alexander Farber schrieb am 02.03.2017 um 21:45: I am calling this stored function - CREATE OR REPLACE FUNCTION words_get_board( in_gid integer ) RETURNS TABLE ( out_bid integer, out_letters varchar[15][15], out_values integ

Re: [GENERAL] CentOS 7.3, PostgreSQL 9.6.2, PHP 5.4 deliver array as string

2017-03-02 Thread Alexander Farber
Yes, as David notices it is SQL function and not pg/PlSQL (you have probably misread this). I wonder what to do with the string in PHP, how to convert it to an (2-dimensional) array.

Re: [GENERAL] CentOS 7.3, PostgreSQL 9.6.2, PHP 5.4 deliver array as string

2017-03-02 Thread Alexander Farber
Adrian, but the stored function works, I am just not happy that the results are casted to strings by PHP... and wonder hpw to fix or workaround this. > >

Re: [GENERAL] CentOS 7.3, PostgreSQL 9.6.2, PHP 5.4 deliver array as string

2017-03-02 Thread David G. Johnston
On Thu, Mar 2, 2017 at 2:12 PM, Adrian Klaver wrote: > On 03/02/2017 12:45 PM, Alexander Farber wrote: > >> Good evening! >> >> I am calling this stored function - >> >> CREATE OR REPLACE FUNCTION words_get_board( >> in_gid integer >> ) RETURNS TABLE ( >> o

Re: [GENERAL] CentOS 7.3, PostgreSQL 9.6.2, PHP 5.4 deliver array as string

2017-03-02 Thread Adrian Klaver
On 03/02/2017 12:45 PM, Alexander Farber wrote: Good evening! I am calling this stored function - CREATE OR REPLACE FUNCTION words_get_board( in_gid integer ) RETURNS TABLE ( out_bid integer, out_letters varchar[15][15], ou

[GENERAL] CentOS 7.3, PostgreSQL 9.6.2, PHP 5.4 deliver array as string

2017-03-02 Thread Alexander Farber
Good evening! I am calling this stored function - CREATE OR REPLACE FUNCTION words_get_board( in_gid integer ) RETURNS TABLE ( out_bid integer, out_letters varchar[15][15], out_values integer[15][15] ) AS $func$