Re: [GENERAL] initdb createuser commands

2016-10-30 Thread Melvin Davidson
On Sun, Oct 30, 2016 at 8:08 PM, Samuel Williams < space.ship.travel...@gmail.com> wrote: > Sorry, just to clarify, b "worst" I don't mean functionality, I mean > the way the commands are named and organised. > > On 31 October 2016 at 13:07, Samuel Williams > wrote: > > Mike, I agree with "the po

[GENERAL] Solution: On Windows with Mingw, how to Install PostgreSQL with zlib, pltcl, plperl, and plpython

2016-10-30 Thread Andre Mikulec
Thanks for all of the help. Here, is the summary that I had promised. In addition to the documentation here https://www.postgresql.org/docs/manuals/ and https://wiki.postgresql.org/wiki/Main_Page I will explain how I install PostgreSQL using on Windows using Mingw with zlib, pltcl, plperl, and

Re: [GENERAL] Checking Postgres Streaming replication delay

2016-10-30 Thread Venkata B Nagothi
On Mon, Oct 31, 2016 at 11:57 AM, Patrick B wrote: > Hi guys, > > I'm using this query to measure the delay between a Master and a Streaming > Replication Slave server, using PostgreSQL 9.2. > > SELECT >> pg_last_xlog_receive_location() receive, >> pg_last_xlog_replay_location() replay, >> ( >> e

[GENERAL] Checking Postgres Streaming replication delay

2016-10-30 Thread Patrick B
Hi guys, I'm using this query to measure the delay between a Master and a Streaming Replication Slave server, using PostgreSQL 9.2. SELECT > pg_last_xlog_receive_location() receive, > pg_last_xlog_replay_location() replay, > ( > extract(epoch FROM now()) - > extract(epoch FROM pg_last_xact_replay

Re: [GENERAL] initdb createuser commands

2016-10-30 Thread Samuel Williams
Sorry, just to clarify, b "worst" I don't mean functionality, I mean the way the commands are named and organised. On 31 October 2016 at 13:07, Samuel Williams wrote: > Mike, I agree with "the postgres way of doing things". I'm suggesting that > >> these commands are sufficiently generic that th

Re: [GENERAL] initdb createuser commands

2016-10-30 Thread Samuel Williams
Mike, I agree with "the postgres way of doing things". I'm suggesting that > these commands are sufficiently generic that they might clash with other commands. > It's also not obvious they are part of postgresql. > Wouldn't it make more sense to make them subcommand, of, say, a top level pga (p

Re: [GENERAL] initdb createuser commands

2016-10-30 Thread Mike Sofen
From: Samuel Williams Sent: Sunday, October 30, 2016 3:42 PM As a community I'd think that having feedback from a new user would be valuable since as you say, sometimes when you get ingrained into the "way of doing things" that you don't see how they could be improved or different. Samuel

Re: [GENERAL] initdb createuser commands

2016-10-30 Thread Adrian Klaver
On 10/30/2016 03:42 PM, Samuel Williams wrote: A given the number of new users I see showing up and the number of those using a GUI like pgAdmin I am not seeing the priority. Well, maybe the reason for this is that the command line tools are not well thought out and people reach for alternativ

Re: [GENERAL] initdb createuser commands

2016-10-30 Thread Samuel Williams
> A given the number of new users I see showing up and the number of those > using a GUI like pgAdmin I am not seeing the priority. Well, maybe the reason for this is that the command line tools are not well thought out and people reach for alternatives. > but you are pushing against something t

Re: [GENERAL] initdb createuser commands

2016-10-30 Thread Adrian Klaver
On 10/30/2016 12:15 AM, Samuel Williams wrote: Adrian, I like the idea of teaching the appropriate SQL to achieve the same thing. It makes a lot of sense, it's a pity the majority of documentation doesn't do this. John, if you read my earlier email you'd see that I proposed including deprecation

Re: [GENERAL] initdb createuser commands

2016-10-30 Thread Adrian Klaver
On 10/30/2016 02:19 AM, Samuel Williams wrote: John - that's an interesting example. If it's that easy, why isn't that the approach given in tutorials and other documentation? What was the motivation for the createuser command? psql was less user friendly in the past? Compare: https://www.pos

Re: [GENERAL] Way to quickly detect if database tables/columns/etc. were modified?

2016-10-30 Thread Melvin Davidson
On Sun, Oct 30, 2016 at 8:04 AM, Alban Hertroys wrote: > > > On 30 Oct 2016, at 10:45, Evan Martin > wrote: > > > > If I have a query that reads from system tables like pg_class, > pg_namespace, pg_attribute, pg_type, etc. and I'd like to cache the results > in my application is there any fast w

Re: [GENERAL] Rows are repeating by the trigger function

2016-10-30 Thread Adrian Klaver
On 10/30/2016 02:31 AM, Kiran wrote: Dear Folks, I have a table *cf_question *with 31 rows. I want to insert/update another table *cf_user_question_link* when cf_question table is inserted/updated with row(s). I have written trigger function for this as follows. CREATE FUNCTION user_question

Re: [GENERAL] Rows are repeating by the trigger function

2016-10-30 Thread Kiran
Hi Alban, I agree with you about the UPDATE. Thanks for pointing out. regards Kiran On Sun, Oct 30, 2016 at 12:49 PM, Alban Hertroys wrote: > > > On 30 Oct 2016, at 10:31, Kiran wrote: > > > > Dear Folks, > > > > I have a table cf_question with 31 rows. > > I want to insert/update another t

[GENERAL] PostgreSQL and ArcGIS used in UK military exercise

2016-10-30 Thread Mark Morgan Lloyd
Potentially useful publicity. http://www.theregister.co.uk/2016/10/28/unmanned_warrior_esri_argcis_cloud_based_mapping/ -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- Sent via pgsql-general mailing list (p

Re: [GENERAL] Way to quickly detect if database tables/columns/etc. were modified?

2016-10-30 Thread Alban Hertroys
> On 30 Oct 2016, at 10:45, Evan Martin wrote: > > If I have a query that reads from system tables like pg_class, pg_namespace, > pg_attribute, pg_type, etc. and I'd like to cache the results in my > application is there any fast way to detect when any changes have been made > to these system

Re: [GENERAL] Rows are repeating by the trigger function

2016-10-30 Thread Alban Hertroys
> On 30 Oct 2016, at 10:31, Kiran wrote: > > Dear Folks, > > I have a table cf_question with 31 rows. > I want to insert/update another table cf_user_question_link when cf_question > table is inserted/updated with row(s). > I have written trigger function for this as follows. > > >

[GENERAL] Way to quickly detect if database tables/columns/etc. were modified?

2016-10-30 Thread Evan Martin
If I have a query that reads from system tables like pg_class, pg_namespace, pg_attribute, pg_type, etc. and I'd like to cache the results in my application is there any fast way to detect when any changes have been made to these system catalogs? I don't need to know exactly what has changed.

[GENERAL] Rows are repeating by the trigger function

2016-10-30 Thread Kiran
Dear Folks, I have a table *cf_question *with 31 rows. I want to insert/update another table *cf_user_question_link* when cf_question table is inserted/updated with row(s). I have written trigger function for this as follows. CREATE FUNCTION user_question_link() RETURNS trigger AS $user_questi

Re: [GENERAL] initdb createuser commands

2016-10-30 Thread Samuel Williams
John - that's an interesting example. If it's that easy, why isn't that the approach given in tutorials and other documentation? What was the motivation for the createuser command? On 30 October 2016 at 20:20, John R Pierce wrote: > On 10/30/2016 12:15 AM, Samuel Williams wrote: >> >> But, I thin

Re: [GENERAL] initdb createuser commands

2016-10-30 Thread John R Pierce
On 10/30/2016 12:15 AM, Samuel Williams wrote: But, I think having "pg_createuser" or, preferrably, "pg createuser". psql -c "create user " -- john r pierce, recycling bits in santa cruz -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subs

Re: [GENERAL] initdb createuser commands

2016-10-30 Thread Samuel Williams
Adrian, I like the idea of teaching the appropriate SQL to achieve the same thing. It makes a lot of sense, it's a pity the majority of documentation doesn't do this. John, if you read my earlier email you'd see that I proposed including deprecation notices and aliasing the commands. I appreciate