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(?)

[GENERAL] DISTINCT vs GROUP BY - was Re: is (not) distinct from

2017-03-02 Thread George Neuner
On Wed, 01 Mar 2017 11:12:29 -0500, Tom Lane wrote: >This is a great example of "select distinct" being used as a band-aid >over a fundamental misunderstanding of SQL. It's good advice to never use >"distinct" unless you know exactly why your query is generating duplicate

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, >                

Re: [GENERAL] Postgres 9.x table/index stats reset timestamp

2017-03-02 Thread Michael Paquier
On Fri, Mar 3, 2017 at 3:03 AM, Dave Quello wrote: > Function pg_stat_reset_single_table_counters() resets stats for a single > table/index that you typically query through pg_stat_user_tables or > pg_stat_user_indexes, but there is no apparent way to retrieve the timestamp >

Re: [GENERAL] PG on SSD

2017-03-02 Thread Scott Marlowe
On Thu, Mar 2, 2017 at 12:42 PM, scott ribe wrote: > Is it reasonable to run PG on a mirrored pair of something like the Intel SSD > DC 3610 series? (For example: > http://ark.intel.com/products/82935/Intel-SSD-DC-S3610-Series-480GB-2_5in-SATA-6Gbs-20nm-MLC) > I'd

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

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

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

[GENERAL] PG on SSD

2017-03-02 Thread scott ribe
Is it reasonable to run PG on a mirrored pair of something like the Intel SSD DC 3610 series? (For example: http://ark.intel.com/products/82935/Intel-SSD-DC-S3610-Series-480GB-2_5in-SATA-6Gbs-20nm-MLC) I'd *hope* that anything Intel classifies as a "Data Center SSD" would be reasonably

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],

[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$

[GENERAL] Postgres 9.x table/index stats reset timestamp

2017-03-02 Thread Dave Quello
Hi, Function *pg_stat_reset_single_table_counters*() resets stats for a single table/index that you typically query through pg_stat_user_tables or pg_stat_user_indexes, but there is no apparent way to retrieve the timestamp of the reset. All stats in the db can be reset using pg_stat_reset()

Re: [GENERAL] pg_restore successful with warnings returns exit code of non-zero

2017-03-02 Thread Adrian Klaver
On 03/02/2017 07:39 AM, dhanuj hippie wrote: I have a pg dump (custom format, column-inserts) which I'm restoring on an existing DB as " /usr/bin/pg_restore -a -v -d db1 -F c " and the input is passed in from stdin. It warns on a couple of existing rows, but completes successfully with "WARNING:

[GENERAL] pg_restore successful with warnings returns exit code of non-zero

2017-03-02 Thread dhanuj hippie
I have a pg dump (custom format, column-inserts) which I'm restoring on an existing DB as " /usr/bin/pg_restore -a -v -d db1 -F c " and the input is passed in from stdin. It warns on a couple of existing rows, but completes successfully with "WARNING: errors ignored on restore: 5". However, this

Re: [GENERAL] column "waiting" does not exist

2017-03-02 Thread Johann Spies
Thanks Charles and Neslişah. Charles Clavadetscher wrote: The name of the column in pg_stat_activity has changed. I assume it comes from there? On 2 March 2017 at 10:54, Neslisah Demirci wrote: > Your monitoring program is

Re: [GENERAL] Setup pgpool-II with streaming replication

2017-03-02 Thread subash
Hi Ashish, could you please help me setting up the pgpool , i am currenlty into same like u had asked to setup . I have mater/slave 9.4 and i would need to setup pgpool so that app connects to pgpool and diverts the connection to new master . Could u please help me with ur thoughts? Thanks,

Re: [GENERAL] appropriate column for storing ipv4 address

2017-03-02 Thread Emre Hasegeli
> Maybe it will be useful for you! Or maybe there is already some built-in way > to treat cidr columns like ranges? There is GiST operator class since version 9.4 and SP-GiST operator class on version 9.6: CREATE INDEX ON tracked_ip_address USING gist (ip_address inet_ops); CREATE INDEX ON

Ynt: [GENERAL] column "waiting" does not exist

2017-03-02 Thread Neslisah Demirci
Hi , Your monitoring program is trying to use pg_stat_activity's old version. In 9.6 pg_stat_activity has new columns named wait_event , wait_event_type . Which monitoring programme? Neslişah Demirci | Veritabanı Yöneticisi Ayazağa cad. No:4 Uniq İstanbul Plaza B2 /Kat:3 34396

Re: [GENERAL] column "waiting" does not exist

2017-03-02 Thread Charles Clavadetscher
Hello From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Johann Spies Sent: Donnerstag, 2. März 2017 09:28 To: pgsql-general@postgresql.org Subject: [GENERAL] column "waiting" does not exist I have no idea what is causing this message in the logs

[GENERAL] column "waiting" does not exist

2017-03-02 Thread Johann Spies
I have no idea what is causing this message in the logs (PostgreSQL 9.6+177.pgdg80+1 on Debian): 2017-03-02 10:20:25 SAST [5196-1] [unknown] postgres postgres@template1 ERROR: column "waiting" does not exist at character 217 2017-03-02 10:20:25 SAST [5196-2] [unknown] postgres postgres@template1