Re: [GENERAL] Errors while installing PostGIS by an unusual method

2016-10-25 Thread Daniel Caldeweyher
Hi Ankit, You might have specific requirements to need PG 9.6. But if 9.5 is sufficient, it will be easier to simply do a rpm/yum install. Regards, Daniel On Tue, Oct 25, 2016 at 4:08 AM, Ankit Sablok wrote: > Thanks for replying Tom and Asif, I think the issue was that libpq.so > present in t

Re: [GENERAL] Query help

2016-10-04 Thread Daniel Caldeweyher
Try this: select distinct vendor_no, vendor_name from ap_vendors where vendor_no in ( select vendor_no from ap_vendors group by vendor_no having array_agg(company_code) @> ARRAY['BUR','EBC','SNJ']) On Wed, Oct 5, 2016 at 1:31 PM, Bret Stern wrote: > Good evening, > I'm curious about a

Re: [GENERAL] Duplicate data despite unique constraint

2016-09-10 Thread Daniel Caldeweyher
I had a similar issue once and was able to recover from it. If this affects only some rows and you are able to identify them, this is fixable: --force table scan to skip using corrupt index set enable_seqscan=1 set enable_indexscan=0 set enable_bitmapscan=0 select email,count(*) from users group b

Re: [GENERAL] Do function calls the cached?

2016-09-01 Thread Daniel Caldeweyher
t; On Tue, Aug 30, 2016 at 4:15 PM, Daniel Caldeweyher > wrote: > >> >> select x,y,z, (extract_keywords(l.*)).* >> >> ​[...]​ > > >> Does this mean the function gets called three time? >> > > ​Yes. > ​ > > (​function_call(...)).*​

[GENERAL] Do function calls the cached?

2016-08-30 Thread Daniel Caldeweyher
Hi, I have an expensive function that does a lot of regex and other text analysis. This function relies on several columns of my table and for efficiency/code reuse also has several OUT arguments: CREATE OR REPLACE FUNCTION extract_keywords(IN l large_table, OUT a text, OUT b text, OUT c text)

Re: [GENERAL] create table if not exists xx AS select ...

2015-03-22 Thread Daniel Caldeweyher
Thanks Michael, I suppose I should have checked the docs for CREATE TABLE AS and not just CREATE TABLE :) Regards, Daniel On Mon, Mar 23, 2015 at 11:41 AM, Michael Paquier wrote: > On Mon, Mar 23, 2015 at 10:28 AM, Daniel Caldeweyher > wrote: > > I am not entirely sure if t

[GENERAL] create table if not exists xx AS select ...

2015-03-22 Thread Daniel Caldeweyher
Hi All, I am not entirely sure if this is a bug (fails on 9.3 and 9.4) or working as intended: create table if not exists test ( foo boolean ); create table if not exists test2 as select * from test where 1=0; /* ERROR: syntax error at or near "as" LINE 1: create table if not exists test2 as */