[GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Craig Ringer
Hi all I've had some issues with how the procedural languages are packaged in the Windows installer for a while, but I was very surprised to see that plpython2 appears to be entirely absent in 9.3. It doesn't seem to be provided via EDB's StackBuilder app either. What's going on? It looks like i

[GENERAL] csv import error

2014-09-23 Thread Eugenio Trumpy
Hello, I'm trying to import data using a csv file, but I got an error: ERROR: column "key;daprof;aprof;tipo;valore;note;oid;unit_mis" of relation "assorb" does not exist LINE 1: INSERT INTO "info_pozzi_hydrocarbon"."assorb" ("key;daprof;a...

Re: [GENERAL] csv import error

2014-09-23 Thread FarjadFarid(ChkNet)
Hi, Quotation marks should be around both the name of each and every column and their values. Also replace column comas as separation character for sql insert statement. What has happened here is that the values from CSV are directly into sql. Hope this helps. Best Regards

Re: [GENERAL] csv import error

2014-09-23 Thread Rémi Cura
Why don't you use "COPY" ? Cheers, Rémi-C 2014-09-23 12:50 GMT+02:00 FarjadFarid(ChkNet) < farjad.fa...@checknetworks.com>: > Hi, > > > > Quotation marks should be around both the name of each and every column > and their values. > > > > Also replace column comas as separation character for sql i

[GENERAL] Fw: strange problem with not existing roles

2014-09-23 Thread lud...@kni-online.de
Hi List, a workaround for my own problems as described below: In the following system-table-colums (type aclitem[]) I replaced all entries with these non-existing Group-Roles with something like {postgres=arwdDxt/postgres,kniprath=arwdDxt/kniprath}, this resets the privileges to just these two (

Re: [GENERAL] csv import error

2014-09-23 Thread FarjadFarid(ChkNet)
Hi, Quotation marks should be around both the name of each and every column and their values. As the columns names are all lower case. You may wish to remove all quotation marks which is much easier. But character value needs quotation mark. Also replace the semi-column as column

Re: [GENERAL] wide row insert via Postgres jdbc driver

2014-09-23 Thread Bill Moran
On Tue, 23 Sep 2014 13:24:40 +0800 Sameer Kumar wrote: > > I am working with a vendor and planning to deploy their application on > PostgreSQL as backend. They have cautioned the customer that PostgreSQL's > jdbc driver v9.1 (build 900) has issues which causes deadlocks while "wide > record inser

Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Seref Arikan
I've gone through the same journey myself. Tried to juggle dlls etc. Apparently python 2 is no longer included in the windows installer. Since I have lots of python 2.x code with native extensions etc, I thought about compiling postgres from source on Windows but as usual the process turned into a

Re: [GENERAL] csv import error

2014-09-23 Thread Eugenio Trumpy
Hi, I adjusted the csv, changing the semi-column with column and inserting the quote for character. Now it seems to be better but I got another error. This last is due to the fact that oid column in my postgresql table is a serial and I did not filled it in csv because I was thinking that would

Re: [GENERAL] csv import error

2014-09-23 Thread FarjadFarid(ChkNet)
Hi Eugenio, How you got about resolving this depends on your project, the size of data. For a simple case, which this seems to be. Simply don't insert the serial column. E.g. remove both name of the column and its corresponding value in the insert statement. Postgresql will insert these

Re: [GENERAL] wide row insert via Postgres jdbc driver

2014-09-23 Thread Thomas Kellerer
Sameer Kumar schrieb am 23.09.2014 um 07:24: > I am working with a vendor and planning to deploy their application > on PostgreSQL as backend. They have cautioned the customer that > PostgreSQL's jdbc driver v9.1 (build 900) has issues which causes > deadlocks while "wide record inserts". Can you

Re: [GENERAL] wide row insert via Postgres jdbc driver

2014-09-23 Thread Bill Moran
On Tue, 23 Sep 2014 14:12:22 +0200 Thomas Kellerer wrote: > Sameer Kumar schrieb am 23.09.2014 um 07:24: > > I am working with a vendor and planning to deploy their application > > on PostgreSQL as backend. They have cautioned the customer that > > PostgreSQL's jdbc driver v9.1 (build 900) has is

Re: [GENERAL] Employee modeling question

2014-09-23 Thread Nelson Green
On Fri, Sep 5, 2014 at 11:39 AM, Rich Shepard wrote: > On Fri, 5 Sep 2014, John McKown wrote: > > They are excellent. They are _not_ for beginners. The "For Smarties" >> portion is not just a play against the "For Dummies" series. Joe does some >> high powered SQL. >> > > For the purpose of de

Re: [GENERAL] csv import error

2014-09-23 Thread Eugenio Trumpy
Thank you Farjad, following your suggestion I'm now able to import my csv and the serial automatically is inserted in the new records. Bye E. From: farjad.fa...@checknetworks.com To: frippe12...@hotmail.com; pgsql-general@postgresql.org Subject: RE: [GENERAL] csv import error Date: Tue, 23 Sep

Re: [GENERAL] Installing Postgresql on Linux Friendlyarm

2014-09-23 Thread Vick Khera
On Tue, Sep 23, 2014 at 2:29 AM, Abelard Hoffman wrote: > Typically, applications open the port as root and then change to low > privilege for the actual service. > See also this thread: > > http://stackoverflow.com/questions/413807/is-there-a-way-for-non-root-processes-to-bind-to-privileged-ports

Re: [GENERAL] Question about Vacuum and Replication failures in 9.3.5

2014-09-23 Thread Adrian Klaver
On 09/22/2014 10:21 PM, Joel Avni wrote: Its version 9.3.5, whats interesting the that the table grew in size after the vacuum full, which I did to try to see why the auto vacuum wasn¹t working. Please do not top post, it makes it difficult to follow the thread. However, after I stopped the P

[GENERAL] Unexpected syntax error when using JSON -> in 9.3.5

2014-09-23 Thread Seamus Abshere
hi all, This part looks correct and expected: $ psql foobar psql (9.3.5) Type "help" for help. foobar=# select coalesce('{}'::json->'a', 1); ERROR: COALESCE types json and integer cannot be matched LINE 1: select coalesce('{}'::json->'a', 1); ^ but c

[GENERAL] Will there be a JSON operator like ->> but returning numeric?

2014-09-23 Thread Seamus Abshere
hi, I've got use cases like array_remove(array_agg((a->>'b')::float), NULL) It would be nice to replace (a->>'b')::float with something like a->^'b' that directly returned a numeric... is that in the cards? Thanks, Seamus -- Seamus Abshere, SCEA https://github.com/seamusabshere -- Se

Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Daniel Lenski
Craig Ringer 2ndquadrant.com> writes: > I've had some issues with how the procedural languages are packaged in > the Windows installer for a while, but I was very surprised to see that > plpython2 appears to be entirely absent in 9.3. > > It doesn't seem to be provided via EDB's StackBuilder app

Re: [GENERAL] Unexpected syntax error when using JSON -> in 9.3.5

2014-09-23 Thread David G Johnston
seamusabshere wrote > hi all, > > This part looks correct and expected: > >> $ psql foobar >> psql (9.3.5) >> Type "help" for help. >> >> foobar=# select coalesce('{}'::json->'a', 1); >> ERROR: COALESCE types json and integer cannot be matched >> LINE 1: select coalesce('{}'::json->'a', 1); >>

Re: [GENERAL] Unexpected syntax error when using JSON -> in 9.3.5

2014-09-23 Thread Tom Lane
Seamus Abshere writes: >> foobar=# select coalesce('{}'::json->'a', 1); >> ERROR: COALESCE types json and integer cannot be matched Right ... > but check it out when I use a string instead of an integer: >> foobar=# select coalesce('{}'::json->'a', 'b'); >> ERROR: invalid input syntax for typ

Re: [GENERAL] Will there be a JSON operator like ->> but returning numeric?

2014-09-23 Thread Tom Lane
Seamus Abshere writes: > I've got use cases like >> array_remove(array_agg((a->>'b')::float), NULL) > It would be nice to replace (a->>'b')::float with something like >> a->^'b' > that directly returned a numeric... is that in the cards? I believe we discussed this, along with variants to return

[GENERAL] fmgr_oldstyle in extensions

2014-09-23 Thread Paul Ramsey
  Hi all, I’m trying to implement an spgist index in the PostGIS extension, which seems like it should work, but is thus far not working for what appear (to me) to be issues in the way spgist expects to pass pointers to user-defined functions. Right before anything happens, spgist calls a ‘co

Re: [GENERAL] fmgr_oldstyle in extensions

2014-09-23 Thread Andres Freund
Hi Paul, On 2014-09-23 09:55:32 -0700, Paul Ramsey wrote: > I’m trying to implement an spgist index in the PostGIS extension, which seems > like it should work, but is thus far not working for what appear (to me) to > be issues in the way spgist expects to pass pointers to user-defined > functi

Re: [GENERAL] fmgr_oldstyle in extensions

2014-09-23 Thread Paul Ramsey
Oh vey, I knew after spending a half-day walking through the debugger it would turn out to be a trivial mistake on my part. This is always how it is when the Magic Fails to Work :) Thanks so much for the help! (and now I know a lot more about the function manager (well, the old one)). P --  Pa

[GENERAL] deadlock of lock-waits (on transaction and on tuple) using same update statement

2014-09-23 Thread Andrej Vanek
Hi, My application runs many concurrent sessions with the same transaction code starting with an update statement. I would expect locking and serialization of those transactions. But I get unexpected deadlocks. As opposed to *http://momjian.us/main/writings/pgsql/locking.pdf

Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Nick Guenther
Quoting Seref Arikan : On Tue, Sep 23, 2014 at 9:36 AM, Craig Ringer wrote: Hi all I've had some issues with how the procedural languages are packaged in the Windows installer for a while, but I was very surprised to see that plpython2 appears to be entirely absent in 9.3. It doesn't seem

Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Alan Hodgson
On Tuesday, September 23, 2014 02:05:48 PM Nick Guenther wrote: > I uninstalled all the postgres subpackages and rebuilt them from > ports, and ended up with an identical plpython2.so, which has these > checksums: > SHA256 (/usr/local/lib/postgresql/plpython2.so) = > 8c7ff6358d9bf0db342e3aca1762cd7

Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Adrian Klaver
On 09/23/2014 11:05 AM, Nick Guenther wrote: Quoting Seref Arikan : On Tue, Sep 23, 2014 at 9:36 AM, Craig Ringer wrote: Hi all I've had some issues with how the procedural languages are packaged in the Windows installer for a while, but I was very surprised to see that plpython2 appears

Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Daniel Lenski
On Tue, Sep 23, 2014 at 11:05 AM, Nick Guenther wrote: > I've struggled with plpython on OpenBSD 5.5-amd64 as well. Could it be related? Maybe the amount of dependencies python pulls in gets overwhelming and things break? > > > $ psql -h localhost -d postgres > psql (9.3.2) > Type "help" for help.

[GENERAL] which Update quicker

2014-09-23 Thread Emi Lu
Hello list, For a big table with more than 1,000,000 records, may I know which update is quicker please? (1) update t1 set c1 = a.c1 from a where pk and t1.c1 <> a.c1; .. update t1 set c_N = a.c_N from a where pk and

Re: [GENERAL] which Update quicker

2014-09-23 Thread Daniele Varrazzo
On Tue, Sep 23, 2014 at 8:35 PM, Emi Lu wrote: > Hello list, > > For a big table with more than 1,000,000 records, may I know which update is > quicker please? > > (1) update t1 > set c1 = a.c1 > from a > where pk and > t1.c1 <> a.c1; > .. > upda

Re: [GENERAL] which Update quicker

2014-09-23 Thread Steve Crawford
On 09/23/2014 12:35 PM, Emi Lu wrote: Hello list, For a big table with more than 1,000,000 records, may I know which update is quicker please? (1) update t1 set c1 = a.c1 from a where pk and t1.c1 <> a.c1; .. update t1 set c_N = a.c_N

Fwd: Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Nick Guenther
On September 23, 2014 2:27:29 PM EDT, Adrian Klaver wrote: On 09/23/2014 11:05 AM, Nick Guenther wrote: Quoting Seref Arikan : On Tue, Sep 23, 2014 at 9:36 AM, Craig Ringer wrote: Hi all I've had some issues with how the procedural languages are packaged in the Windows installer

[GENERAL] pg_dump: [archiver] -C and -c are incompatible options

2014-09-23 Thread Carlos Carcamo
Hello list, I need some help with this error: ... pg_dump: saving encoding = UTF8 pg_dump: saving standard_conforming_strings = on pg_dump: [archiver] -C and -c are incompatible options pg_dump: *** aborted because of error Process returned exit code 1. I get this error when i'm trying to create

Re: [GENERAL] pg_dump: [archiver] -C and -c are incompatible options

2014-09-23 Thread Tom Lane
Carlos Carcamo writes: > Hello list, I need some help with this error: > ... > pg_dump: saving encoding = UTF8 > pg_dump: saving standard_conforming_strings = on > pg_dump: [archiver] -C and -c are incompatible options > pg_dump: *** aborted because of error Like it says, you should not use both

Re: [GENERAL] pg_dump: [archiver] -C and -c are incompatible options

2014-09-23 Thread Adrian Klaver
On 09/23/2014 04:01 PM, Carlos Carcamo wrote: Hello list, I need some help with this error: ... pg_dump: saving encoding = UTF8 pg_dump: saving standard_conforming_strings = on pg_dump: [archiver] -C and -c are incompatible options pg_dump: *** aborted because of error Process returned exit code

Re: [GENERAL] pg_dump: [archiver] -C and -c are incompatible options

2014-09-23 Thread David G Johnston
Tom Lane-2 wrote > Carlos Carcamo < > eazyduiz@ > > writes: >> Hello list, I need some help with this error: >> ... >> pg_dump: saving encoding = UTF8 >> pg_dump: saving standard_conforming_strings = on >> pg_dump: [archiver] -C and -c are incompatible options >> pg_dump: *** aborted because of e

[GENERAL] JSONB spaces in text presentation

2014-09-23 Thread Ilya I. Ashchepkov
Hi. Is spaces is nessesary in text presentation of JSONB? In my data resulting text contains ~12% of spaces. I'm developing web application, and want to get json-string from pg and send it to browser without repacking. -- С уважением, Ащепков Илья koc...@gmail.com

Re: [GENERAL] PROBLEM Service Alert: hostname/check_postgres_old_transaction is CRITICAL **

2014-09-23 Thread Adarsh Sharma
Thanks Jan.!! Will check and update you all the findings. Cheers On Sat, Sep 20, 2014 at 4:17 AM, Jan-Pieter Cornet wrote: > On 2014-9-19 20:33 , Adarsh Sharma wrote: > > It returns approx *311 MB* data to the client servers. > > > > root > netstat -p | grep 45355 > > tcp0 1531648 local