Re: [GENERAL] Does a call to a language handler provide a context/session, and somewhere to keep session data?

2016-03-08 Thread Alvaro Herrera
da...@andl.org wrote: > > ow...@postgresql.org] On Behalf Of Adrian Klaver > > > On that subject. I have followed this thread, but only sort of as the > > quoting your email client is doing tends to obscure the flow. I know > > for me that is making it hard to follow your ideas. > > > > Is that

Re: [GENERAL] Does a call to a language handler provide a context/session, and somewhere to keep session data?

2016-03-08 Thread Adrian Klaver
On 03/08/2016 04:39 PM, da...@andl.org wrote: ow...@postgresql.org] On Behalf Of Adrian Klaver On that subject. I have followed this thread, but only sort of as the quoting your email client is doing tends to obscure the flow. I know for me that is making it hard to follow your ideas. Is

Re: [GENERAL] Does a call to a language handler provide a context/session, and somewhere to keep session data?

2016-03-08 Thread david
> ow...@postgresql.org] On Behalf Of Adrian Klaver > On that subject. I have followed this thread, but only sort of as the > quoting your email client is doing tends to obscure the flow. I know > for me that is making it hard to follow your ideas. > > Is that something that can be changed? I

Re: [GENERAL] Does a call to a language handler provide a context/session, and somewhere to keep session data?

2016-03-08 Thread Adrian Klaver
On 03/08/2016 03:44 PM, da...@andl.org wrote: From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Jan de Visser OK, still not quite sure what your architecture is. Is it (1) +---+ | Client system | +---+

Re: [GENERAL] Does a call to a language handler provide a context/session, and somewhere to keep session data?

2016-03-08 Thread david
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Jan de Visser OK, still not quite sure what your architecture is. Is it (1) +---+ | Client system | +---+ | v +---+ | andl

Re: [GENERAL] pg_upgrade error regarding hstore operator

2016-03-08 Thread Tom Lane
"Feld, Michael (IMS)" writes: > I am attempting to upgrade my organization's database cluster from > 9.1.19 to 9.5.1 using the pg_upgrade utility. That's kind of a big jump :-( ... you missed the versions where => was deprecated as an operator name. > I tried dropping the

Re: [GENERAL] pg_upgrade error regarding hstore operator

2016-03-08 Thread Adrian Klaver
On 03/08/2016 10:27 AM, Feld, Michael (IMS) wrote: I am attempting to upgrade my organization's database cluster from 9.1.19 to 9.5.1 using the pg_upgrade utility. After some processing, the tool bails out with the following error in the log: pg_restore: creating OPERATOR "public.=>"

Re: [GENERAL] Logger into table and/or to cli

2016-03-08 Thread Thiemo Kellner, NHC Barhufpflege
If I have understood correctly, the application logging would polute the server log with that solution. And it looks rather clumsy to me to import the log file into a table. Much more it would require to ignore somehow already imported log entries not to get multiple entries when the

[GENERAL] pg_upgrade error regarding hstore operator

2016-03-08 Thread Feld, Michael (IMS)
I am attempting to upgrade my organization's database cluster from 9.1.19 to 9.5.1 using the pg_upgrade utility. After some processing, the tool bails out with the following error in the log: pg_restore: creating OPERATOR "public.=>" pg_restore: [archiver (db)] Error while PROCESSING TOC:

[GENERAL] Windows default directory for client certificates

2016-03-08 Thread Lupi Loop
PostgreSQL documentation at http://www.postgresql.org/docs/9.5/static/libpq-ssl.html says that when a client certificate is requested by a server, a windows client psql will use by default the credentials located at %APPDATA%\postgresql\postgresql.crt and %APPDATA%\postgresql\postgresql.key

Re: [GENERAL] Plan to support predicate push-down into subqueries with aggregates?

2016-03-08 Thread David G. Johnston
We bottom (or inline) post on these lists. On Tue, Mar 8, 2016 at 3:37 PM, Adam Brusselback wrote: > ​ > On Tue, Mar 8, 2016 at 5:17 PM, Tom Lane wrote: > >> Adam Brusselback writes: >> > I was wondering if there were

Re: [GENERAL] Plan to support predicate push-down into subqueries with aggregates?

2016-03-08 Thread Adam Brusselback
Thanks Tom, appreciate the reply. Sorry if I didn't call it the correct thing. I just know that with trying to encapsulate this aggregate logic in a view, I am unable to use that view in a query that I know is only going to touch a subset of the data without incurring a performance hit from the

Re: [GENERAL] Plan to support predicate push-down into subqueries with aggregates?

2016-03-08 Thread Tom Lane
Adam Brusselback writes: > I was wondering if there were any plans to support predicate push-down > optimization for subqueries (and views) with aggregates? Right offhand I would say that that's a complete mischaracterization of the problem. I've not tried to run your

[GENERAL] Plan to support predicate push-down into subqueries with aggregates?

2016-03-08 Thread Adam Brusselback
Hi all. I was wondering if there were any plans to support predicate push-down optimization for subqueries (and views) with aggregates? I was recently bit by this, as I had incorrectly assumed that this was an optimization that was in place, and designed quite a bit around that assumption, only

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
På tirsdag 08. mars 2016 kl. 21:03:01, skrev David G. Johnston < david.g.johns...@gmail.com >: On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh > wrote: På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D.

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread David G. Johnston
On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh wrote: > På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake < > j...@commandprompt.com>: > > On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote: > > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane

Re: [GENERAL] Logger into table and/or to cli

2016-03-08 Thread Thiemo Kellner, NHC Barhufpflege
Thanks for your hint. If I have understood correctly, the application logging would polute the server log with that solution. And it looks rather clumsy to me to import the log file into a table. Much more it would require to ignore somehow already imported log entries not to get multiple

Re: [GENERAL] Generate PG schemas from the Oracle Data Modeler tool?

2016-03-08 Thread Adrian Klaver
On 03/08/2016 08:58 AM, Ken Winter wrote: I have established a connection between the Oracle tool and my PG databases by installing the PG JDBC driver from https://jdbc.postgresql.org/download.html and following instructions at

Re: [GENERAL] Generate PG schemas from the Oracle Data Modeler tool?

2016-03-08 Thread Ken Winter
I have established a connection between the Oracle tool and my PG databases by installing the PG JDBC driver from https://jdbc.postgresql.org/download.html and following instructions at http://stackoverflow.com/questions/7592519/oracle-sql-developer-and-postgresql/22299552 and

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake < j...@commandprompt.com >: On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote: > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane >: > >     

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Joshua D. Drake
On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote: På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane >: Andreas Joseph Krogh writes: > What I'm looking for is "inverse -b" in an otherwise complete dump. Any

Re: [GENERAL] Does a call to a language handler provide a context/session, and somewhere to keep session data?

2016-03-08 Thread Jan de Visser
On March 8, 2016 03:00:14 PM da...@andl.org wrote: > At the moment I have two pressing problems. > > One is the start-up phase: getting the Andl runtime stoked up, load its > catalog, set up its execution environment (including its own type system), > ready for business. That process in Postgres

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
På tirsdag 08. mars 2016 kl. 17:10:43, skrev Tom Lane >: Andreas Joseph Krogh writes: > P�� tirsdag 08. mars 2016 kl. 16:54:19, skrev Adrian Klaver < > adrian.kla...@aklaver.com >: >  Off hand

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Tom Lane
Andreas Joseph Krogh writes: > PÃ¥ tirsdag 08. mars 2016 kl. 16:54:19, skrev Adrian Klaver < > adrian.kla...@aklaver.com >: > Off hand I would say you are running pg_dump as a user that is not a > superuser: > Yes, since when should I not

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Melvin Davidson
On Tue, Mar 8, 2016 at 11:02 AM, Andreas Joseph Krogh wrote: > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane : > > Andreas Joseph Krogh writes: > > What I'm looking for is "inverse -b" in an otherwise complete dump. Any > plans

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane >: Andreas Joseph Krogh writes: > What I'm looking for is "inverse -b" in an otherwise complete dump. Any plans > to add that? [ shrug... ]  Nobody ever asked for it

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
På tirsdag 08. mars 2016 kl. 16:54:19, skrev Adrian Klaver < adrian.kla...@aklaver.com >: On 03/08/2016 07:46 AM, Andreas Joseph Krogh wrote: > På tirsdag 08. mars 2016 kl. 16:30:36, skrev Tom Lane >: > >     

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Tom Lane
Andreas Joseph Krogh writes: > What I'm looking for is "inverse -b" in an otherwise complete dump. Any plans > to add that? [ shrug... ] Nobody ever asked for it before. regards, tom lane -- Sent via pgsql-general mailing list

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Adrian Klaver
On 03/08/2016 07:46 AM, Andreas Joseph Krogh wrote: På tirsdag 08. mars 2016 kl. 16:30:36, skrev Tom Lane >: Andreas Joseph Krogh writes: > P�� tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver < >

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
På tirsdag 08. mars 2016 kl. 16:30:36, skrev Tom Lane >: Andreas Joseph Krogh writes: > P�� tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver < > adrian.kla...@aklaver.com >: >  Do you

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Tom Lane
Andreas Joseph Krogh writes: > PÃ¥ tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver < > adrian.kla...@aklaver.com >: > Do you care about not dumping the pg_largeobject table or not dumping > the data it contains? > > I have several

Re: [GENERAL] Inserting JSON via Java PreparedStatment

2016-03-08 Thread Adrian Klaver
On 03/07/2016 07:15 PM, Curt Huffman wrote: Thanks Rob & David! I got it to work using the following: String qry = "INSERT INTO event " + "(spotid, qid, userid, persid, , " + "evtvalue, evtdt, evtjson) " + "VALUES(?,?,?,?,?,?,?,?,?,?,to_json(?::json));"; and pStmt.setString

Re: [GENERAL] Inserting JSON via Java PreparedStatment

2016-03-08 Thread Curt Huffman
Thanks Rob & David! I got it to work using the following: String qry = "INSERT INTO event " + "(spotid, qid, userid, persid, , " + "evtvalue, evtdt, evtjson) " + "VALUES(?,?,?,?,?,?,?,?,?,?,to_json(?::json));"; and pStmt.setString (11,dtlRec.toString()); (another suggestion was to use:

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
På tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver < adrian.kla...@aklaver.com >: On 03/08/2016 01:53 AM, Andreas Joseph Krogh wrote: > Hi all. > Is there a way to exclude pg_largeobject from pg_dump? -T pg_largeobject > doesn't work. I've tried to

Re: [GENERAL] Subtract one array from another, both with non-unique elements

2016-03-08 Thread Victor Yegorov
2016-03-08 15:59 GMT+02:00 Alexander Farber : > Here 1-pass version, if you have improvement suggestions, you are welcome - > My variant: CREATE OR REPLACE FUNCTION arrexcept(anyarray, anyarray) RETURNS anyarray AS $arrexcept$ SELECT array_agg(un) FROM ( SELECT

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Adrian Klaver
On 03/08/2016 01:53 AM, Andreas Joseph Krogh wrote: Hi all. Is there a way to exclude pg_largeobject from pg_dump? -T pg_largeobject doesn't work. I've tried to exclude tables using OID-datatype also but that didn't work either. Well pg_largeobject is a system catalog so pretty sure it cannot

Re: [GENERAL] Subtract one array from another, both with non-unique elements

2016-03-08 Thread Alexander Farber
Here 1-pass version, if you have improvement suggestions, you are welcome - DROP FUNCTION IF EXISTS words_array_subtract(anyarray, anyarray); CREATE OR REPLACE FUNCTION words_array_subtract(from_array anyarray, remove_array anyarray) RETURNS anyarray AS $func$ DECLARE

Re: [GENERAL] Subtract one array from another, both with non-unique elements

2016-03-08 Thread Alexander Farber
Hello again, I could not find a solution neither at http://postgres.cz/wiki/Array_based_functions nor at https://github.com/JDBurnZ/postgresql-anyarray So I have written my own stored function to subtract one non-unique array from another (like swapping tiles in a word game): DROP FUNCTION IF

Re: [GENERAL] Logger into table and/or to cli

2016-03-08 Thread Berend Tober
Thiemo Kellner, NHC Barhufpflege wrote: I would like to log from within pgsql into table and/or to command line, something like https://sourceforge.net/projects/plnsqllogger/ . Does anybody know of an open source solution available? I like "18.8.4. Using CSV-Format Log Output", although it

Re: [GENERAL] index problems (again)

2016-03-08 Thread Geoff Winkless
On 7 March 2016 at 20:40, Peter J. Holzer wrote: > As Tom wrote, the estimate of having to read only about 140 rows is only > valid if sc_id and sc_date are uncorrelated. In reality your query has > to read a lot more than 140 rows, so it is much slower. But as I've said

[GENERAL] Exclude pg_largeobject form pg_dump

2016-03-08 Thread Andreas Joseph Krogh
Hi all.   Is there a way to exclude pg_largeobject from pg_dump? -T pg_largeobject doesn't work. I've tried to exclude tables using OID-datatype also but that didn't work either.   Thanks.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com