[GENERAL] Testing truthiness of GUC variables?

2014-09-15 Thread Abelard Hoffman
If I set a custom GUC variable to a boolean value, such as: SET myapp.audit = 'on'; is there a way to test it for truthiness in the same way the standard built-in variables are? IOW, the docs say a boolean can be written as: Boolean values can be written as on, off, true, false, yes, no, 1, 0

Re: [GENERAL] Testing truthiness of GUC variables?

2014-09-15 Thread Abelard Hoffman
On Sun, Sep 14, 2014 at 11:17 PM, Abelard Hoffman abelardhoff...@gmail.com wrote: If I set a custom GUC variable to a boolean value, such as: SET myapp.audit = 'on'; is there a way to test it for truthiness in the same way the standard built-in variables are? IOW, the docs say a boolean

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

2014-09-15 Thread Marti Raudsepp
On Mon, Sep 15, 2014 at 8:22 AM, cowwoc cow...@bbs.darktech.org wrote: I took a look at the PL/Java project and it looked both incomplete and dead, yet other languages like Javascript are taking off. I would have expected to see very strong support for Java because it's the most frequently used

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

2014-09-15 Thread Chris Travers
On Sun, Sep 14, 2014 at 10:22 PM, cowwoc cow...@bbs.darktech.org wrote: Hi, Out of curiosity, why is Postgresql's Java support so poor? I am specifically looking for the ability to write triggers in Java. Because it hasn't been a priority of contributors. This is how non-single-vendor open

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

2014-09-15 Thread Bill Moran
On Sun, 14 Sep 2014 22:22:21 -0700 (PDT) cowwoc cow...@bbs.darktech.org wrote: Out of curiosity, why is Postgresql's Java support so poor? To trampoline off what others have said: it gets implemented and maintained if people want/need it. But I feel like I have a little more insight into

[GENERAL] sp-gist vs gist - ltree datatype

2014-09-15 Thread Misa Simic
Hi all, has anyone maybe test sp-gist over ltree datatype? would sp-gist be better option for it? Thanks, Misa

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

2014-09-15 Thread Zenaan Harkness
On 9/15/14, Chris Travers chris.trav...@gmail.com wrote: On Sun, Sep 14, 2014 at 10:22 PM, cowwoc cow...@bbs.darktech.org wrote: Out of curiosity, why is Postgresql's Java support so poor? I am specifically looking for the ability to write triggers in Java. Because it hasn't been a priority

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

2014-09-15 Thread Achilleas Mantzios
On 15/09/2014 08:22, cowwoc wrote: Hi, Out of curiosity, why is Postgresql's Java support so poor? I am specifically looking for the ability to write triggers in Java. I took a look at the PL/Java project and it looked both incomplete and dead, yet other languages like Javascript are taking

Re: [GENERAL] Testing truthiness of GUC variables?

2014-09-15 Thread Kevin Grittner
Abelard Hoffman abelardhoff...@gmail.com wrote: Boolean values can be written as on, off, true, false, yes, no, 1, 0 (all case-insensitive) or any unambiguous prefix of these. is there a built-in function I can call, given the value from current_setting('myapp.audit'), that will test it

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

2014-09-15 Thread Tim Clarke
On 15/09/14 13:30, Achilleas Mantzios wrote: This is far from dead. I works perfectly with java 1.7 and postgresql 9.3 , but you need maybe a little bit more extra homework + some skills with maven. If i managed to build this on a FreeBSD machine, in linux it should a piece of cake. The

Re: [GENERAL] Feature request: temporary schemas

2014-09-15 Thread Adrian Klaver
On 09/14/2014 08:21 PM, cowwoc wrote: Hi Adrian, Replies below. On 14/09/2014 8:34 PM, Adrian Klaver wrote: On 09/14/2014 02:01 PM, cowwoc wrote: See http://dba.stackexchange.com/q/76494/4719 for a related discussion. So from the above link and the discussion here so far I gather you want:

Re: [GENERAL] Feature request: temporary schemas

2014-09-15 Thread cowwoc
On 15/09/2014 9:39 AM, Adrian Klaver wrote: Not exactly. Each test is responsible for populating its own schema (creating tables, inserting data). The main purpose of using temporary schemas is to ensure that each test runs in isolation so that data from other tests cannot influence the outcome

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

2014-09-15 Thread Merlin Moncure
On Mon, Sep 15, 2014 at 6:03 AM, Chris Travers chris.trav...@gmail.com wrote: On Sun, Sep 14, 2014 at 10:22 PM, cowwoc cow...@bbs.darktech.org wrote: Hi, Out of curiosity, why is Postgresql's Java support so poor? I am specifically looking for the ability to write triggers in Java.

Re: [GENERAL] Feature request: temporary schemas

2014-09-15 Thread Rob Sargent
Interesting enough concept. Please don't forget to test against a realistic data set as well. It does seem to me that the devs can easily make, fill, clean up their own db. And a central builder (eg Jenkins?) can do the same with, importantly using ALL tests. Then again using real data. On

Re: [GENERAL] Feature request: temporary schemas

2014-09-15 Thread Adrian Klaver
On 09/15/2014 07:08 AM, cowwoc wrote: On 15/09/2014 9:39 AM, Adrian Klaver wrote: Not exactly. Each test is responsible for populating its own schema (creating tables, inserting data). The main purpose of using temporary schemas is to ensure that each test runs in isolation so that data from

Re: [GENERAL] Feature request: temporary schemas

2014-09-15 Thread cowwoc
On 15/09/2014 10:37 AM, Adrian Klaver wrote: From your second post: 1. I'm already planning to run unit tests against a separate (but identical) database than production, so there's no danger of wiping out the production database. 2. I need to create a new temporary schema per test,

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

2014-09-15 Thread Michael Paquier
On Mon, Sep 15, 2014 at 11:23 PM, Merlin Moncure mmonc...@gmail.com wrote: So I'd argue plv8 has a much better case of being put 'in core', but I'd argue that neither of them should be. Why? The core team is already supporting enough code and it seems better to make the extension framework

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

2014-09-15 Thread Michael Paquier
On Tue, Sep 16, 2014 at 1:43 AM, Michael Paquier michael.paqu...@gmail.com wrote: https://apps.fedoraproject.org/packages/v8 Forgot to add that this is probably one of the reasons why Fedora sticks to this version. -- Michael -- Sent via pgsql-general mailing list

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

2014-09-15 Thread cowwoc
Hi guys, Any chance you guys could help cleaning up the build/deploy process? This is a pretty big hurdle to overcome for new users. Gili On 15/09/2014 8:55 AM, Tim Clarke [via PostgreSQL] wrote: On 15/09/14 13:30, Achilleas Mantzios wrote: This is far from dead. I works perfectly with

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

2014-09-15 Thread cowwoc
On 15/09/2014 7:03 AM, Chris Travers wrote: I have a few questions on this, the answers of which may help answer your question: 1. How well does having a server-side JVM work, resource-wise, when you have a forked process model like PostgreSQL? Does having the additional JVM's pose

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

2014-09-15 Thread cowwoc
On 15/09/2014 7:58 AM, Bill Moran wrote: On Sun, 14 Sep 2014 22:22:21 -0700 (PDT) cowwoc cow...@bbs.darktech.org wrote: Out of curiosity, why is Postgresql's Java support so poor? To trampoline off what others have said: it gets implemented and maintained if people want/need it. But I feel

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

2014-09-15 Thread Pavel Stehule
2014-09-15 19:34 GMT+02:00 cowwoc cow...@bbs.darktech.org: On 15/09/2014 7:03 AM, Chris Travers wrote: I have a few questions on this, the answers of which may help answer your question: 1. How well does having a server-side JVM work, resource-wise, when you have a forked process model

Re: [GENERAL] Pgpool starting problem

2014-09-15 Thread Jay at Verizon
Problem has been solved utilizing tcpdump which revealed that the standbys were not trying to contact the primary server, although they each were contacting the other standby. From this, we determined that a minor typographical error was present in the pgpool.conf file. The setting under the

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

2014-09-15 Thread Pavel Stehule
2014-09-15 19:37 GMT+02:00 cowwoc cow...@bbs.darktech.org: On 15/09/2014 7:58 AM, Bill Moran wrote: On Sun, 14 Sep 2014 22:22:21 -0700 (PDT) cowwoc cow...@bbs.darktech.org wrote: Out of curiosity, why is Postgresql's Java support so poor? To trampoline off what others have said: it gets

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

2014-09-15 Thread cowwoc
Hi Pavel, On 15/09/2014 1:40 PM, Pavel Stehule wrote: The main drivers are: 1. Not having to learn yet another language. I find the expressiveness and readability of the other scripting languages very clunky compared to Java. PLpgSQL is different, it is based on Ada

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

2014-09-15 Thread Pavel Stehule
2014-09-15 19:46 GMT+02:00 Pavel Stehule pavel.steh...@gmail.com: 2014-09-15 19:37 GMT+02:00 cowwoc cow...@bbs.darktech.org: On 15/09/2014 7:58 AM, Bill Moran wrote: On Sun, 14 Sep 2014 22:22:21 -0700 (PDT) cowwoc cow...@bbs.darktech.org wrote: Out of curiosity, why is Postgresql's Java

Re: [GENERAL] Feature request: temporary schemas

2014-09-15 Thread Adrian Klaver
On 09/15/2014 08:05 AM, cowwoc wrote: On 15/09/2014 10:37 AM, Adrian Klaver wrote: From your second post: 1. I'm already planning to run unit tests against a separate (but identical) database than production, so there's no danger of wiping out the production database. 2. I need to

[GENERAL] BDR Error recovery

2014-09-15 Thread p...@mailme.dk
Ubuntu 14.04 with compiled BDR 0.7.1 This is a very interesting project for a lot of potential applications. However as in any project there will be a few initial issues. My question is how do I recover from DDL errors ? For example: given a setup of 2 BDR PostgreSQL hosts and on one of them

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

2014-09-15 Thread Rob Sargent
On 09/15/2014 11:49 AM, cowwoc wrote: Hi Pavel, On 15/09/2014 1:40 PM, Pavel Stehule wrote: The main drivers are: 1. Not having to learn yet another language. I find the expressiveness and readability of the other scripting languages very clunky compared to Java.

[GENERAL] BDR DML Only

2014-09-15 Thread p...@mailme.dk
Is it already possible or would you consider a configuration option that would only replicate DML but not DDL ? This should of course be combined with a predictable way of manually handling DDL errors. Like simply manually adding any missing DDL on the slave. Thanks Poul -- Sent via

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

2014-09-15 Thread cowwoc
On 15/09/2014 1:51 PM, Pavel Stehule [via PostgreSQL] wrote: and I am not sure if Java as stored procedures is living technology, It was designed as esperanto, but it is supported only by Oracle after 14 years. Pavel H2, HSQLDB, Derby all support Java triggers. Granted, we are not talking

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

2014-09-15 Thread Pavel Stehule
2014-09-15 19:49 GMT+02:00 cowwoc cow...@bbs.darktech.org: Hi Pavel, On 15/09/2014 1:40 PM, Pavel Stehule wrote: The main drivers are: 1. Not having to learn yet another language. I find the expressiveness and readability of the other scripting languages very clunky compared

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

2014-09-15 Thread cowwoc
On 15/09/2014 2:02 PM, lup [via PostgreSQL] wrote: On 09/15/2014 11:49 AM, cowwoc wrote: I think developers choosing this route (myself included) are willing to pay the price in exchange for improved readability/maintainability (the assumption being that the resulting performance will be

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

2014-09-15 Thread cowwoc
On 15/09/2014 2:12 PM, cowwoc wrote: On 15/09/2014 2:02 PM, lup [via PostgreSQL] wrote: On 09/15/2014 11:49 AM, cowwoc wrote: I think developers choosing this route (myself included) are willing to pay the price in exchange for improved readability/maintainability (the assumption being that

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

2014-09-15 Thread Adrian Klaver
On 09/15/2014 11:00 AM, Rob Sargent wrote: On 09/15/2014 11:49 AM, cowwoc wrote: Hi Pavel, On 15/09/2014 1:40 PM, Pavel Stehule wrote: The main drivers are: 1. Not having to learn yet another language. I find the expressiveness and readability of the other scripting

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

2014-09-15 Thread Szymon Guz
On 15 September 2014 20:13, cowwoc cow...@bbs.darktech.org wrote: On 15/09/2014 2:12 PM, cowwoc wrote: On 15/09/2014 2:02 PM, lup [via PostgreSQL] wrote: On 09/15/2014 11:49 AM, cowwoc wrote: I think developers choosing this route (myself included) are willing to pay the price in exchange

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

2014-09-15 Thread Alberto Cabello Sánchez
On Mon, 15 Sep 2014 13:34:53 -0400 cowwoc cow...@bbs.darktech.org wrote: 2. What is your specific use case for a trigger in Java? The main drivers are: 1. Not having to learn yet another language. Bear in mind that DB programmers often know SQL. To me, and apparently to them, PL/pgsql

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

2014-09-15 Thread Thomas Kellerer
cowwoc wrote on 15.09.2014 19:55: H2, HSQLDB, Derby all support Java triggers. But only because they already live/run inside a JVM, so it's the natural choice of language. And H2 and Derby *only* support Java stored procedures. The main disadvantage I see with that is, that you can't just

Re: [GENERAL] BDR DML Only

2014-09-15 Thread Christoph Moench-Tegeder
## p...@mailme.dk (p...@mailme.dk): Is it already possible or would you consider a configuration option that would only replicate DML but not DDL ? bdr.skip_ddl_replication = true can even be set at transaction level Regards, Christoph -- Spare Space -- Sent via pgsql-general mailing

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

2014-09-15 Thread cowwoc
On 15/09/2014 3:50 PM, Thomas Kellerer [via PostgreSQL] wrote: cowwoc wrote on 15.09.2014 19:55: H2, HSQLDB, Derby all support Java triggers. But only because they already live/run inside a JVM, so it's the natural choice of language. And H2 and Derby *only* support Java stored

[GENERAL] pgcluu error

2014-09-15 Thread AI Rumman
Hi, I am trying to use pgcluu with collected stats and got the error: Can't call method print on an undefined value at /opt/pgdata/pgcluu_prod/pgcluubin/pgcluu line 5494 Any one has idea? Thanks.

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

2014-09-15 Thread David G Johnston
cowwoc wrote On 15/09/2014 2:02 PM, lup [via PostgreSQL] wrote: On 09/15/2014 11:49 AM, cowwoc wrote: I think developers choosing this route (myself included) are willing to pay the price in exchange for improved readability/maintainability (the assumption being that the resulting

Re: [GENERAL] pgcluu error

2014-09-15 Thread David G Johnston
rummandba wrote Hi, I am trying to use pgcluu with collected stats and got the error: Can't call method print on an undefined value at /opt/pgdata/pgcluu_prod/pgcluubin/pgcluu line 5494 Any one has idea? Thanks. You should at least mention that you, correctly, opened an issue on the

Re: [GENERAL] Testing truthiness of GUC variables?

2014-09-15 Thread Abelard Hoffman
On Mon, Sep 15, 2014 at 5:39 AM, Kevin Grittner kgri...@ymail.com wrote: Abelard Hoffman abelardhoff...@gmail.com wrote: Boolean values can be written as on, off, true, false, yes, no, 1, 0 (all case-insensitive) or any unambiguous prefix of these. is there a built-in function I can