Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread cowwoc
Chris, On 18/09/2014 1:07 AM, Chris Travers wrote: On Wed, Sep 17, 2014 at 9:42 PM, cowwoc cow...@bbs.darktech.org mailto:cow...@bbs.darktech.org wrote: Tom, For starters, let's talk strictly about improving the deployment situation, which the core team *is* uniquely positioned

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread Misa Simic
On Thursday, September 18, 2014, cowwoc cow...@bbs.darktech.org wrote: Chris, On 18/09/2014 1:07 AM, Chris Travers wrote: On Wed, Sep 17, 2014 at 9:42 PM, cowwoc cow...@bbs.darktech.org javascript:_e(%7B%7D,'cvml','cow...@bbs.darktech.org'); wrote: Tom, For starters, let's talk

Re: [GENERAL] [SQL] pg_multixact issues

2014-09-18 Thread Dev Kumkar
On Thu, Sep 18, 2014 at 2:41 AM, Adrian Klaver adrian.kla...@aklaver.com wrote: Aaah, hit enter too soon. Also see the other changes under Changes that apply to multixact in 9.3.5 Thanks for sharing same. Found this one interesting Truncate pg_multixact during checkpoints, not during VACUUM

Re: [GENERAL] [SQL] pg_multixact issues

2014-09-18 Thread Andres Freund
On 2014-09-18 14:41:07 +0530, Dev Kumkar wrote: On Thu, Sep 18, 2014 at 2:41 AM, Adrian Klaver adrian.kla...@aklaver.com wrote: Aaah, hit enter too soon. Also see the other changes under Changes that apply to multixact in 9.3.5 Thanks for sharing same. Found this one interesting

Re: [GENERAL] strange problem with not existing roles

2014-09-18 Thread lud...@kni-online.de
Hi Adrian, data got into the database with normal update/insert-queries from logged-in database-users using normal PG-Users/roles, the ghost-roles (with these unusual numerical role-names) were never created by me, I dont know where they come from. The query [SNIP] SELECT * FROM

Re: [GENERAL] [SQL] pg_multixact issues

2014-09-18 Thread Dev Kumkar
On Thu, Sep 18, 2014 at 4:03 PM, Andres Freund and...@2ndquadrant.com wrote: I don't think that's relevant for you. Did you upgrade the database using pg_upgrade? That's correct! No, there is no upgrade here. Can you show pg_controldata output and the output of 'SELECT oid, datname,

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread David G Johnston
cowwoc wrote Chris, On 18/09/2014 1:07 AM, Chris Travers wrote: On Wed, Sep 17, 2014 at 9:42 PM, cowwoc lt; cowwoc@.darktech gt; lt;mailto: cowwoc@.darktech gt; wrote: Tom, For starters, let's talk strictly about improving the deployment situation, which the core

Re: [GENERAL] strange problem with not existing roles

2014-09-18 Thread Adrian Klaver
On 09/18/2014 04:12 AM, lud...@kni-online.de wrote: Hi Adrian, data got into the database with normal update/insert-queries from logged-in database-users using normal PG-Users/roles, the ghost-roles (with these unusual numerical role-names) were never created by me, I don't know where they come

[GENERAL] I want the stupidest possible binary export

2014-09-18 Thread David Rysdam
I've got a some tables with bytea fields that I want to export only the binary data to files. (Each field has a gzipped data file.) I really want to avoid adding overhead to my project by writing a special program to do this, so I'm trying to do it from psql. Omitting the obvious switches for

Re: [GENERAL] I want the stupidest possible binary export

2014-09-18 Thread Szymon Guz
On 18 September 2014 16:06, David Rysdam drys...@ll.mit.edu wrote: I've got a some tables with bytea fields that I want to export only the binary data to files. (Each field has a gzipped data file.) I really want to avoid adding overhead to my project by writing a special program to do this,

Re: [GENERAL] I want the stupidest possible binary export

2014-09-18 Thread Adrian Klaver
On 09/18/2014 07:06 AM, David Rysdam wrote: I've got a some tables with bytea fields that I want to export only the binary data to files. (Each field has a gzipped data file.) I really want to avoid adding overhead to my project by writing a special program to do this, so I'm trying to do it

Re: [GENERAL] I want the stupidest possible binary export

2014-09-18 Thread Jov
psql can only input/output text string,which can not be binary content。with 9.2,you can encode bytea to base64,save to file,then use shell command to decode the file。 google “amutu.com pg bytea” can get a blog post。 with upcoming 9.4,you can change bytea to large object,then use lo_* psql cmd

Re: [GENERAL] I want the stupidest possible binary export

2014-09-18 Thread David Rysdam
Adrian Klaver adrian.kla...@aklaver.com writes: psql -t -c \copy (select mybinaryfield from mytable where key = 1) to 'file' with format binary From here: http://www.postgresql.org/docs/9.2/static/app-psql.html the above should be: psql -t -c \copy (select mybinaryfield from

Re: [GENERAL] I want the stupidest possible binary export

2014-09-18 Thread David Rysdam
Jov am...@amutu.com writes: psql can only input/output text string,which can not be binary content。with 9.2,you can encode bytea to base64,save to file,then use shell command to decode the file。 google “amutu.com pg bytea” can get a blog post。 I wondered if I could do that. OK, will try it,

Re: [GENERAL] I want the stupidest possible binary export

2014-09-18 Thread Nicklas Avén
I use php and pg_unescape_bytea  http://php.net/manual/en/function.pg-unescape-bytea.php You also need to set bytea format to escaped in front of your query.  If php can be en option /Nicklas Avén Skickat från min Samsung Mobil. div Originalmeddelande /divdivFrån: Jov

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread John R Pierce
On 9/18/2014 6:18 AM, David G Johnston wrote: What distributions of JRE are available on the Windows platform and which ones are allowed to be privately distributed? afaik, Sun/Oracle is /the/ Java for Windows, and AFAIK, it does NOT allow redistribution, Oracle wants you to register each

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread Szymon Guz
On 18 September 2014 17:32, John R Pierce pie...@hogranch.com wrote: On 9/18/2014 6:18 AM, David G Johnston wrote: What distributions of JRE are available on the Windows platform and which ones are allowed to be privately distributed? afaik, Sun/Oracle is /the/ Java for Windows, and AFAIK,

Re: [GENERAL] I want the stupidest possible binary export

2014-09-18 Thread David Rysdam
Jov am...@amutu.com writes: psql can only input/output text string,which can not be binary content。with 9.2,you can encode bytea to base64,save to file,then use shell command to decode the file。 This worked, btw. Encoded to base64, piped to sed to fix the newlines, piped to 'base64 -id' and

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread cowwoc
John, You are confusing a private JRE installation with the public JRE installation (yes, there is such a thing). The public JRE is found in java/jre8. The private JRE is found in java/jdk1.8.0_20/jre. http://www.oracle.com/technetwork/java/javase/jdk-8-readme-2095712.html#redistribution

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread cowwoc
On 18/09/2014 9:18 AM, David G Johnston [via PostgreSQL] wrote: What distributions of JRE are available on the Windows platform and which ones are allowed to be privately distributed? (Answered in a follow-up email to John Pierce) For this scenario your target audience is the people, at

Re: [GENERAL] strange problem with not existing roles

2014-09-18 Thread lud...@kni-online.de
Hi Adrian, this database runs as develop-version on my PC and was created by hand, no dumps or pg_upgrade. The same database runs as production-version on another server (PostgreSQL 9.3.1, compiled by Visual C++ build 1600, 32-bit), so far without these problems. pgAdmin shows a mix of the

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread John R Pierce
On 9/18/2014 9:07 AM, cowwoc wrote: You are confusing a private JRE installation with the public JRE installation (yes, there is such a thing). The public JRE is found in java/jre8. The private JRE is found in java/jdk1.8.0_20/jre.

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread Szymon Guz
On 18 September 2014 18:54, John R Pierce pie...@hogranch.com wrote: On 9/18/2014 9:07 AM, cowwoc wrote: You are confusing a private JRE installation with the public JRE installation (yes, there is such a thing). The public JRE is found in java/jre8. The private JRE is found in

Re: [GENERAL] [SQL] pg_multixact issues

2014-09-18 Thread Dev Kumkar
On Thu, Sep 18, 2014 at 6:20 PM, Dev Kumkar devdas.kum...@gmail.com wrote: On Thu, Sep 18, 2014 at 4:03 PM, Andres Freund and...@2ndquadrant.com wrote: I don't think that's relevant for you. Did you upgrade the database using pg_upgrade? That's correct! No, there is no upgrade here.

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread John R Pierce
On 9/18/2014 10:17 AM, Szymon Guz wrote: Does it mean that there should be distributed many jvm.dlls for each of the jvm versions? jvm.dll is part of the jre, its not a standalone library. -- john r pierce 37N 122W somewhere on the middle of the left

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread cowwoc
On 18/09/2014 1:31 PM, John R Pierce [via PostgreSQL] wrote: On 9/18/2014 10:17 AM, Szymon Guz wrote: Does it mean that there should be distributed many jvm.dlls for each of the jvm versions? jvm.dll is part of the jre, its not a standalone library. Right, so to recap: each platform will

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread John R Pierce
On 9/18/2014 11:06 AM, cowwoc wrote: On 18/09/2014 1:31 PM, John R Pierce [via PostgreSQL] wrote: On 9/18/2014 10:17 AM, Szymon Guz wrote: Does it mean that there should be distributed many jvm.dlls for each of the jvm versions? jvm.dll is part of the jre, its not a standalone library.

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread cowwoc
On 18/09/2014 2:21 PM, John R Pierce [via PostgreSQL] wrote: Right, so to recap: each platform will only need one jvm.dll/so library (which you would update over time). You don't need to include one version for Oracle JDK, OpenJDK, GCJ. You'd pick one, and bundle its jvm.dll (I'd suggest

[GENERAL] How can i monitor exactly what (partition) tables are accessed by a query?

2014-09-18 Thread Robert Nix
I'm experiencing a problem with queries apparently not using the check constraints of my partition tables (tried constraint_exclusion =partition and =on with same results) and explain isn't sufficient to diagnose the issue because the value for the check constraint in the query comes from a join

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread John R Pierce
On 9/18/2014 11:44 AM, cowwoc wrote: Yes, that's what I meant. I just wanted to reinforce the fact that you don't need to bundle multiple JVMs (Oracle, OpenJDK and GCJ). You'd pick one and bundle it alongside PG and pl/java. I think a lawyer would have to pick apart the JRE redistribution

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread cowwoc
On 18/09/2014 3:17 PM, John R Pierce [via PostgreSQL] wrote: On 9/18/2014 11:44 AM, cowwoc wrote: Yes, that's what I meant. I just wanted to reinforce the fact that you don't need to bundle multiple JVMs (Oracle, OpenJDK and GCJ). You'd pick one and bundle it alongside PG and pl/java.

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread Guy Rouillier
On 9/18/2014 2:44 PM, cowwoc wrote: Yes, that's what I meant. I just wanted to reinforce the fact that you don't need to bundle multiple JVMs (Oracle, OpenJDK and GCJ). You'd pick one and bundle it alongside PG and pl/java. I've been following along as an interested observer, having used

Re: [GENERAL] strange problem with not existing roles

2014-09-18 Thread Adrian Klaver
On 09/18/2014 09:44 AM, lud...@kni-online.de wrote: Hi Adrian, this database runs as develop-version on my PC and was created by hand, no dumps or pg_upgrade. The same database runs as production-version on another server (PostgreSQL 9.3.1, compiled by Visual C++ build 1600, 32-bit), so far

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread cowwoc
Guy, As far as I understand, the concerns you brought up only apply to a public JRE. A private JRE is no different than any other library Postgresql links against. It's an implementation detail that does not affect your system-wide applications. Your vulnerability is no greater using an

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread Shaun Thomas
On 09/17/2014 11:30 PM, Tom Lane wrote: But here's the *key* reason: if pl/java is failing to stay afloat as an external project, that is a terrible reason for pulling it into core. It suggests strongly that the manpower or interest to keep it going simply doesn't exist. This is really all

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread David G Johnston
On Thu, Sep 18, 2014 at 4:00 PM, cowwoc [via PostgreSQL] ml-node+s1045698n5819545...@n5.nabble.com wrote: Guy, As far as I understand, the concerns you brought up only apply to a public JRE. A private JRE is no different than any other library Postgresql links against. It's an

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread Shaun Thomas
On 09/18/2014 03:26 PM, David G Johnston wrote: There is a lot that can be done in this area but someone - and not the core developers - needs to champion the cause; providing or asking for specific core enhancements to be made as integration problems arise. Then help the various packagers

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread cowwoc
On 18/09/2014 4:26 PM, David G Johnston [via PostgreSQL] wrote: ​ only PostgreSQL uses it ... PostgreSQL doesn't use Java. I don't think it makes a difference from a licensing point of view. The point is that the JRE is not used to run multiple distinct applications. You want PostgreSQL to

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread Merlin Moncure
On Wed, Sep 17, 2014 at 11:42 PM, cowwoc cow...@bbs.darktech.org wrote: Tom, For starters, let's talk strictly about improving the deployment situation, which the core team *is* uniquely positioned to do. The pl/java author(s) should figure out what needs to be done but once that's known we

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread Edson Carlos Ericksson Richter
On 18-09-2014 17:58, cowwoc wrote: On 18/09/2014 4:26 PM, David G Johnston [via PostgreSQL] wrote: ​ only PostgreSQL uses it ... PostgreSQL doesn't use Java. I don't think it makes a difference from a licensing point of view. The point is that the JRE is not used to run multiple distinct

Re: [GENERAL] [SQL] pg_multixact issues

2014-09-18 Thread Adrian Klaver
On 09/18/2014 10:22 AM, Dev Kumkar wrote: On Thu, Sep 18, 2014 at 6:20 PM, Dev Kumkar devdas.kum...@gmail.com mailto:devdas.kum...@gmail.com wrote: On Thu, Sep 18, 2014 at 4:03 PM, Andres Freund and...@2ndquadrant.com mailto:and...@2ndquadrant.com wrote: I don't think that's

[GENERAL] a couple questions about convert()

2014-09-18 Thread smcg2297
Hello, In a postgresql-9.3.1 database with UTF8 encoding I can do: select convert_from (E'\\x68656c6c6f', 'LATIN1'); convert_from -- hello But when I explicitly give the to encoding: select convert (E'\\x68656c6c6f', 'LATIN1', 'UTF8'); convert --

[GENERAL] How to run a second instance on the same server?

2014-09-18 Thread Andreas
Hi, I've got 2 hardware servers running PG 9.3.5 from the postgres.org-repository. It's a Ubuntu server 12.x. Box 2 replictes box 1. That works. I'd like to use Box 2 as a Test- and Training installation as it is probaply bored to death just mirroring Box 1. AFAIK I can't just create an

Re: [GENERAL] How to run a second instance on the same server?

2014-09-18 Thread John R Pierce
On 9/18/2014 6:14 PM, Andreas wrote: I've got 2 hardware servers running PG 9.3.5 from the postgres.org-repository. It's a Ubuntu server 12.x. Box 2 replictes box 1. That works. I'd like to use Box 2 as a Test- and Training installation as it is probaply bored to death just mirroring Box

Re: [GENERAL] How can i monitor exactly what (partition) tables are accessed by a query?

2014-09-18 Thread Jov
Jov blog: http:amutu.com/blog http://amutu.com/blog 2014-09-19 2:44 GMT+08:00 Robert Nix rob...@urban4m.com: I'm experiencing a problem with queries apparently not using the check constraints of my partition tables (tried constraint_exclusion =partition and =on with same results) and explain

[GENERAL] Re: How can i monitor exactly what (partition) tables are accessed by a query?

2014-09-18 Thread David G Johnston
Robert Nix wrote I'm experiencing a problem with queries apparently not using the check constraints of my partition tables (tried constraint_exclusion =partition and =on with same results) and explain isn't sufficient to diagnose the issue because the value for the check constraint in the

Re: [GENERAL] How can i monitor exactly what (partition) tables are accessed by a query?

2014-09-18 Thread Robert Nix
Joy, The explain plan shows that all partitions will be scanned but i believe that plan isn't valid because the check constraint that dictates which partition to access can't be known until the query is executed due to the value being a join. You can see what i mean using the SQL below. I have

Re: [GENERAL] Re: How can i monitor exactly what (partition) tables are accessed by a query?

2014-09-18 Thread Robert Nix
Thanks, David. I have read that page many times but clearly I have forgotten this: - Constraint exclusion only works when the query's WHERE clause contains constants (or externally supplied parameters). For example, a comparison against a non-immutable function such

Re: [GENERAL] [SQL] pg_multixact issues

2014-09-18 Thread Alvaro Herrera
Dev Kumkar wrote: On Thu, Sep 18, 2014 at 4:03 PM, Andres Freund and...@2ndquadrant.com wrote: Can you show pg_controldata output and the output of 'SELECT oid, datname, relfrozenxid, age(relfrozenxid), relminmxid FROM pg_database;'? Here are the details: oid datname

Re: [GENERAL] Watching Views

2014-09-18 Thread Nick Guenther
Ah! Your reply was excellent, David. I only found it now, cleaning out my inbox. Comments inline! Quoting David G Johnston david.g.johns...@gmail.com: Nick Guenther wrote As you said, attaching the trigger to a view is useless (for BEFORE/AFTER, which I'm interested in, also only works on

[GENERAL] 64-bit TXID?

2014-09-18 Thread cowwoc
Hi, A recent discussion in Slashdot brought up the topic of PostgreSQL's 32-bit TXID system: http://slashdot.org/comments.pl?sid=5725497cid=47942637 I did a quick search and noticed that 8 years ago, a Skype employee provided a patch for migrating to a 64-bit TXID:

Re: [GENERAL] 64-bit TXID?

2014-09-18 Thread Peter Geoghegan
On Thu, Sep 18, 2014 at 9:17 PM, cowwoc cow...@bbs.darktech.org wrote: I did a quick search and noticed that 8 years ago, a Skype employee provided a patch for migrating to a 64-bit TXID: http://postgresql.1045698.n5.nabble.com/RFC-txid-module-for-64-bit-external-transaction-IDs-tt1947503.html