Re: [GENERAL] Extension to rewrite queries before execution

2015-08-14 Thread Guillaume Lelarge
Hi, Le 13 août 2015 9:51 PM, Jeff Janes jeff.ja...@gmail.com a écrit : I am looking for an extension or a technique that will allow me to intercept a query by the exact query text, and replace that query with a different one. The context is running a third-party app which issues queries I

Re: [GENERAL] repmgr won't update witness after failover

2015-08-14 Thread Aviel Buskila
Hey, yes I did .. and still it wont fail back.. 2015-08-13 16:23 GMT+03:00 Jony Vesterman Cohen jony.cohe...@gmail.com: Hi, did you make the old master follow the new one using repmgr? It doesn't update itself automatically... From the looks of it repmgr thinks you have 2 masters - the old

Re: [GENERAL] Extension to rewrite queries before execution

2015-08-14 Thread Tatsuo Ishii
I am looking for an extension or a technique that will allow me to intercept a query by the exact query text, and replace that query with a different one. The context is running a third-party app which issues queries I have no control over. I'd like to intercept a specific query (which has

Re: [GENERAL] I am unable to install PostgreSql

2015-08-14 Thread Adrian Klaver
On 08/14/2015 06:00 AM, Melvin Davidson wrote: Shashank, as stated before, you need to install on a _supported_ O/S. Windows 2003 is NO LONGER SUPPORTED. Not sure that is relevant. So: 1) Where are you getting the Postgres installer from? 2) When you uninstalled are you sure it actually

Re: [GENERAL] Foreign Keys as first class citizens at design time?

2015-08-14 Thread Stephen Feyrer
Hi, I agree with each of the points you've made. The idea here is meant as an extension of what is already available. So yes, this is intended to answer the questions of the designer's original model. The consideration being that you design your database and the underlying logic of your

[GENERAL] Count of non-null values per table column

2015-08-14 Thread David Nelson
Hello list,brbrApologies if this has been asked before. My search only turned up ways to list the total non-null values for all columns as a single number. I want the count for each column by column.brbrI have inherited a database consisting of two related huge monolithic tables that lack

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread David Nelson
Well it is certainly nice to see that my choice to send my question using plain text was honored by this email service. Apologies for that mess. The output I am looking for is a series of rows with two columns, one the name of the table column, and the other the count of non-null values in a

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread David Rowley
On 15 August 2015 at 02:32, David Nelson dlnelson77...@outlook.com wrote: Hello list,brbrApologies if this has been asked before. My search only turned up ways to list the total non-null values for all columns as a single number. I want the count for each column by column.brbrI have inherited

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread John McKown
David, It still came through as junk. But I reconstructed it below === original message === Apologies if this has been asked before. My search only turned up ways to list the total non-null values for all columns as a single number. I want the count for each column by column. I have inherited a

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread Tom Lane
David Rowley david.row...@2ndquadrant.com writes: On 15 August 2015 at 02:32, David Nelson dlnelson77...@outlook.com wrote: Hello list,brbrApologies if this has been asked before. My search only turned up ways to list the total non-null values for all columns as a single number. I want the

Re: [GENERAL] I am unable to install PostgreSql

2015-08-14 Thread Shashank
Hi Melvin Thanks for responding. I am using postgresql-9.4.4-3 version to install. However I am getting the same issue with postgresql-9.3.9-3 version as well. Kindly suggest, what needs to be done. Regards Shashank From:

Re: [GENERAL] PostgreSQL - The Best Overall Database

2015-08-14 Thread Sachin Srivastava
Congrats to all PostgreSQL DBA’s for this achievement.. HERE ARE THE WINNERS OF THE 2015 DBTA READERS' CHOICE AWARDS FOR BEST DATABASE (OVERALL): Winner: PostgreSQLhttp://www.postgresql.org/ http://www.postgresql.org/ Finalists: Oracle Databasehttp://www.oracle.com/ Microsoft SQL

Re: [GENERAL] PostgreSQL - The Best Overall Database

2015-08-14 Thread John R Pierce
On 8/14/2015 11:06 AM, Ravi Krishna wrote: is there any details available on this poll ? the linked article links to this report, which requires registration to download. http://www.dbta.com/DBTA-Downloads/ResearchReports/The-Real-World-of-the-Database-Administrator-5237.aspx -- john r

Re: [GENERAL] PostgreSQL - The Best Overall Database

2015-08-14 Thread Melvin Davidson
Yes. From my original post of CANu8FixZ=-o3nybdma5pxjsyzxqy1n0t4kekg0-1kkvs7fe...@mail.gmail.com http://www.postgresql.org/message-id/CANu8FixZ=-o3nybdma5pxjsyzxqy1n0t4kekg0-1kkvs7fe...@mail.gmail.com Here is the associated url:

Re: [GENERAL] Extension to rewrite queries before execution

2015-08-14 Thread Adrian Klaver
On 08/14/2015 08:56 AM, Jeff Janes wrote: On Thu, Aug 13, 2015 at 2:02 PM, Adrian Klaver adrian.kla...@aklaver.com mailto:adrian.kla...@aklaver.com wrote: On 08/13/2015 12:49 PM, Jeff Janes wrote: I am looking for an extension or a technique that will allow me to intercept

Re: [GENERAL] PostgreSQL - The Best Overall Database

2015-08-14 Thread Ravi Krishna
is there any details available on this poll ? thanks. On Thu, Aug 13, 2015 at 11:05 PM, Sachin Srivastava sachin.srivast...@cyient.com wrote: Congrats to all PostgreSQL DBA’s for this achievement.. HERE ARE THE WINNERS OF THE 2015 DBTA READERS' CHOICE AWARDS FOR BEST DATABASE (OVERALL):

Re: [GENERAL] Extension to rewrite queries before execution

2015-08-14 Thread Melvin Davidson
Jeff, although it would be tedious, you could write a trigger of the form BEFORE INSERT ON yatta_yatta EXECUTE PROCEDURE check_rewrite; Then in check_rewrite, you could examine the contents of pg_stat_activity.query column for the current process and act accordingly. I acknowledge that it will

Re: [GENERAL] stack depth

2015-08-14 Thread Chris Mair
Hi All, I'm tuning up my database and need to increase the max_stack_depth parameter in postgresql.conf. I've edited the /etc/security/limits.conf and added * softstack 12288 * hardstack 12288 but I noticed the comments at the top of the file -

Re: [GENERAL] Extension to rewrite queries before execution

2015-08-14 Thread Andy Colson
On 8/13/2015 2:49 PM, Jeff Janes wrote: I am looking for an extension or a technique that will allow me to intercept a query by the exact query text, and replace that query with a different one. The context is running a third-party app which issues queries I have no control over. I'd like to

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread David Nelson
On Fri, Aug 14, 2015 at 10:00 AM, Tom Lane t...@sss.pgh.pa.us wrote: David Rowley david.row...@2ndquadrant.com writes: On 15 August 2015 at 02:32, David Nelson dlnelson77...@outlook.com wrote: Hello list,brbrApologies if this has been asked before. My search only turned up ways to list the

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread Ken Tanzer
On Fri, Aug 14, 2015 at 6:35 PM, David Nelson dnelson77...@gmail.com wrote: On Fri, Aug 14, 2015 at 10:00 AM, Tom Lane t...@sss.pgh.pa.us wrote: David Rowley david.row...@2ndquadrant.com writes: Tthat is the way I would do it for a table with a small number of columns, but these have

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread David Nelson
On Fri, Aug 14, 2015 at 9:59 AM, John McKown john.archie.mck...@gmail.com wrote: David, It still came through as junk. But I reconstructed it below === original message === Apologies if this has been asked before. My search only turned up ways to list the total non-null values for all

Re: [GENERAL] Extension to rewrite queries before execution

2015-08-14 Thread Jeff Janes
On Thu, Aug 13, 2015 at 1:37 PM, Melvin Davidson melvin6...@gmail.com wrote: On Thu, Aug 13, 2015 at 3:49 PM, Jeff Janes jeff.ja...@gmail.com wrote: I am looking for an extension or a technique that will allow me to intercept a query by the exact query text, and replace that query with a

[GENERAL] stack depth

2015-08-14 Thread Michael H
Hi All, I'm tuning up my database and need to increase the max_stack_depth parameter in postgresql.conf. I've edited the /etc/security/limits.conf and added * softstack 12288 * hardstack 12288 but I noticed the comments at the top of the file - #This

Re: [GENERAL] Extension to rewrite queries before execution

2015-08-14 Thread Jeff Janes
On Thu, Aug 13, 2015 at 2:02 PM, Adrian Klaver adrian.kla...@aklaver.com wrote: On 08/13/2015 12:49 PM, Jeff Janes wrote: I am looking for an extension or a technique that will allow me to intercept a query by the exact query text, and replace that query with a different one. What is

Re: [GENERAL] repmgr won't update witness after failover

2015-08-14 Thread Martín Marqués
El 14/08/15 a las 04:14, Aviel Buskila escribió: Hey, yes I did .. and still it wont fail back.. Can you send over the output of repmgr cluster show before and after the failover process? The output of SELECT * FROM repmgr_schema.repl_nodes; after the failover (you need to change repmgr_schema

Re: [GENERAL] Postgresql jsonb

2015-08-14 Thread Bill Moran
On Fri, 14 Aug 2015 17:39:49 +0530 Deepak Balasubramanyam deepak.b...@gmail.com wrote: I have a table (20 million rows) in Postgresql 9.4 that contains a bigint id as the primary key and another column that contains jsonb data. Queries run on this table look like so... ##

[GENERAL] Postgresql jsonb

2015-08-14 Thread Deepak Balasubramanyam
Hi, I have a table (20 million rows) in Postgresql 9.4 that contains a bigint id as the primary key and another column that contains jsonb data. Queries run on this table look like so... ## Query select ... from table WHERE table.column -'item'- 'name' = 'value'

Re: [GENERAL] Postgresql jsonb

2015-08-14 Thread David Rowley
On 15 August 2015 at 00:09, Deepak Balasubramanyam deepak.b...@gmail.com wrote: Hi, I have a table (20 million rows) in Postgresql 9.4 that contains a bigint id as the primary key and another column that contains jsonb data. Queries run on this table look like so... ## Query

Re: [GENERAL] I am unable to install PostgreSql

2015-08-14 Thread Melvin Davidson
Shashank, as stated before, you need to install on a _supported_ O/S. Windows 2003 is NO LONGER SUPPORTED. So install on Windows 7, Windows 8 or the just released Windows 10. On Thu, Aug 13, 2015 at 11:42 PM, Shashank shashank.i...@gmail.com wrote: Hi Melvin Thanks for responding. I am

Re: [GENERAL] Migrations

2015-08-14 Thread Martín Marqués
El 13/08/15 a las 23:17, Adrian Klaver escribió: On 08/13/2015 05:37 PM, Martín Marqués wrote: El 13/08/15 a las 21:23, Guyren Howe escribió: I also think migrations ought to be a first-class feature… What do you mean with migrations ought to be a first-class feature? There have been, and