Re: [HACKERS] pg_dump dump catalog ACLs

2016-03-02 Thread David G. Johnston
On Wed, Mar 2, 2016 at 1:54 PM, Stephen Frost wrote: > * Joe Conway (m...@joeconway.com) wrote: > > On 03/01/2016 08:00 AM, Tom Lane wrote: > > > Joe Conway writes: > > >> Would it be a terrible idea to add some attribute to ACLs which can be > > >> used to indicate they should not be dumped (an

Re: [HACKERS] pg_dump dump catalog ACLs

2016-03-02 Thread David G. Johnston
On Wed, Mar 2, 2016 at 2:44 PM, Joe Conway wrote: > On 03/02/2016 12:54 PM, Stephen Frost wrote: > > * Joe Conway (m...@joeconway.com) wrote: > >> On 03/01/2016 08:00 AM, Tom Lane wrote: > >>> Yes, we'd need some way to mark non-null ACLs as being "built-in > >>> defaults". I do not see the need

[HACKERS] WHERE clause not used when index is used (9.5)

2016-03-02 Thread David G. Johnston
Placing this specific message onto -bugs while keeping -hackers and removing -novice. Editing subject to include version and remove list identifiers. There is continuing discussion on -hackers though mostly about how to do this right in the future. The specific problem stems from an attempted pe

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-08 Thread David G. Johnston
On Tue, Mar 8, 2016 at 3:57 PM, Corey Huinker wrote: > >> I'm pretty meh about the whole idea of this function, though, >> actually, and I don't see a single clear +1 vote for this >> functionality upthread. (Apologies if I've missed one.) In the >> absence of a few of those, I recommend we rej

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-09 Thread David G. Johnston
tion into the title. -- Forwarded message -- From: Michael Paquier Date: Thu, Jan 28, 2016 at 6:01 AM Subject: Re: [GENERAL] Request - repeat value of \pset title during \watch interations To: "David G. Johnston" Cc: Tom Lane , "pgsql-gene...@postgresql.org" &

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread David G. Johnston
On Thu, Mar 10, 2016 at 8:58 AM, Robert Haas wrote: > On Thu, Mar 10, 2016 at 10:30 AM, Simon Riggs > wrote: > > On 10 March 2016 at 06:53, Michael Paquier > > wrote: > >> > >> On Wed, Mar 9, 2016 at 12:13 AM, Alvaro Herrera > >> wrote: > >> > Robert Haas wrote: > >> >> I'm pretty meh about th

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread David G. Johnston
On Thu, Mar 10, 2016 at 9:30 AM, Michael Paquier wrote: > On Thu, Mar 10, 2016 at 4:58 PM, Robert Haas > wrote: > > On Thu, Mar 10, 2016 at 10:30 AM, Simon Riggs > wrote: > >> On 10 March 2016 at 06:53, Michael Paquier > >> wrote: > >>> > >>> On Wed, Mar 9, 2016 at 12:13 AM, Alvaro Herrera > >

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread David G. Johnston
On Thu, Mar 10, 2016 at 11:45 AM, Robert Haas wrote: > On Thu, Mar 10, 2016 at 11:33 AM, David G. Johnston > wrote: > > I tend to think we err toward this too much. This seems like development > > concerns trumping usability. Consider that anything someone took the >

Re: [HACKERS] PREPARE dynamic SQL in plpgsql

2016-03-11 Thread David G. Johnston
On Fri, Mar 11, 2016 at 4:45 PM, Koichi Suzuki wrote: > Hi, > > Does someone know how to prepare a synamic SQL statement in plpgsql? > > All the examples, PG documents describe only about preparing static SQL > statement. > > You might want to rephrase the question. From the pl/pgsql documentati

Re: [HACKERS] PREPARE dynamic SQL in plpgsql

2016-03-11 Thread David G. Johnston
On Fri, Mar 11, 2016 at 4:45 PM, Koichi Suzuki wrote: > Hi, > > Does someone know how to prepare a synamic SQL statement in plpgsql? > > All the examples, PG documents describe only about preparing static SQL > statement. > > This is not an appropriate question for the -hackers list. It is bette

Re: [HACKERS] Performance improvement for joins where outer side is unique

2016-03-12 Thread David G. Johnston
On Saturday, March 12, 2016, David Rowley wrote: > On 12 March 2016 at 11:43, Tom Lane > > wrote: > > I wrote: > >> I wondered why, instead of inventing an extra semantics-modifying flag, > >> we couldn't just change the jointype to *be* JOIN_SEMI when we've > >> discovered that the inner side is

Re: [HACKERS] Performance improvement for joins where outer side is unique

2016-03-12 Thread David G. Johnston
On Saturday, March 12, 2016, Tom Lane wrote: > "David G. Johnston" > writes: > > Don't the semantics of a SEMI JOIN also state that the output columns > only > > come from the outer relation? i.e., the inner relation doesn't contribute > > either r

Re: [HACKERS] Performance improvement for joins where outer side is unique

2016-03-12 Thread David G. Johnston
On Saturday, March 12, 2016, David G. Johnston wrote: > On Saturday, March 12, 2016, Tom Lane > wrote: > >> "David G. Johnston" writes: >> > Don't the semantics of a SEMI JOIN also state that the output columns >> only >> > come fro

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-18 Thread David G. Johnston
On Thu, Mar 17, 2016 at 8:41 AM, David Steele wrote: > On 3/17/16 11:30 AM, David G. Johnston wrote: > > On Thu, Mar 17, 2016 at 7:57 AM, Corey Huinker > <mailto:corey.huin...@gmail.com>>wrote: > > > > On Thu, Mar 17, 2016 at 10:00 AM, David Steele >

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-19 Thread David G. Johnston
Figured out it had to be added to 2016-09...done On Wed, Mar 9, 2016 at 11:40 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > Adding -hackers for consideration in the Commitfest. > > Thanks! > > David J. > > >>>Original request by me > &

Re: [HACKERS] Request - repeat value of \pset title during \watch interations

2016-03-19 Thread David G. Johnston
On Thursday, March 17, 2016, Michael Paquier wrote: > On Fri, Mar 18, 2016 at 8:16 AM, Tom Lane > wrote: > > David Steele > writes: > >> On 3/17/16 7:00 PM, Tom Lane wrote: > >>> The message I saw was post-1-March. If it was in fact submitted in > >>> time for 2016-03, then we owe it a review.

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-03-19 Thread David G. Johnston
On Wed, Mar 16, 2016 at 4:39 PM, Tom Lane wrote: > Jim Nasby writes: > > On 3/3/16 4:51 AM, Pavel Stehule wrote: > >> CREATE TABLE a(a int); > >> CREATE TABLE b(a a.a%TYPE) > >> > >> And the people expecting the living relation between table a and table > >> b. So when I do ALTER a.a, then b.a s

Re: [HACKERS] Make primnodes.h gender neutral

2016-03-19 Thread David G. Johnston
On Thu, Mar 17, 2016 at 2:17 PM, Gavin Flower wrote: > On 18/03/16 09:41, Joshua D. Drake wrote: > >> On 03/17/2016 01:36 PM, Alvaro Herrera wrote: >> >> [...] > >> >> >>> (*) I'm probably going to be expelled from the project for saying this, >>> but I very much doubt that female coders stay awa

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread David G. Johnston
On Thu, Mar 17, 2016 at 7:57 AM, Corey Huinker wrote: > On Thu, Mar 17, 2016 at 10:00 AM, David Steele > wrote: > >> On 3/17/16 4:49 AM, Dean Rasheed wrote: >> >> > On 16 March 2016 at 23:32, David Steele wrote: >> > >> >> >> >> I think in this case it comes down to a committer's judgement so I

Re: [HACKERS] Make primnodes.h gender neutral

2016-03-19 Thread David G. Johnston
On Thursday, March 17, 2016, Robert Haas wrote: > On Thu, Mar 17, 2016 at 6:34 PM, Chapman Flack > wrote: > > For those of us who are outside of the twitterverse sort of on purpose, > > are there a few representative links you could post? Maybe this is such > > fresh breaking news Google hasn't

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2016-03-20 Thread David G. Johnston
On Sunday, March 20, 2016, Tom Lane wrote: > > * Allow backslash commands to span lines, probably by adopting the > rule that backslash immediately followed by newline is to be ignored > within a backslash command. This would not be compatible with psql, > though, at least not unless we wanted t

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread David G. Johnston
On Mon, Mar 21, 2016 at 8:03 AM, Robert Haas wrote: > On Sun, Mar 20, 2016 at 9:31 AM, Michael Paquier > wrote: > > And the patch attached gives the following output: > > With title: > > =# \watch 1 > > Watch every 1sSun Mar 20 22:28:38 2016 > > popo > > a > > --- > > 1 > > (1 row) > ​Thi

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread David G. Johnston
On Mon, Mar 21, 2016 at 10:14 AM, Tom Lane wrote: > Robert Haas writes: > > Well, the title isn't normally centered, but yeah, that is odd. Yeah, > > that is odd. Come to think of it, I think I might have expected the > > title to appear *above* "Watch every %s", not below it. That might > >

Re: [HACKERS] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread David G. Johnston
On Monday, March 21, 2016, Tom Lane wrote: > "David G. Johnston" > writes: > > I'd rather not omit sleep but removing "Watch every" is fine (preferred > > actually), so: > > Title Is Here Mon Mar 21 15:05:06 2016 (5s) > > Meh ... seem

Re: [HACKERS] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread David G. Johnston
On Monday, March 21, 2016, Robert Haas wrote: > On Mon, Mar 21, 2016 at 2:09 PM, David G. Johnston > > wrote: > > On Monday, March 21, 2016, Tom Lane > > wrote: > >> "David G. Johnston" > writes: > >> > I'd rather not omit sleep but

Re: [HACKERS] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread David G. Johnston
On Monday, March 21, 2016, Tom Lane wrote: > "David G. Johnston" > writes: > > I'll admit it's awkward because it's abbreviated but if someone enters > > \watch 5 and then sees (5s) in the title I think they can put two and two > > together. >

Re: [HACKERS] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread David G. Johnston
On Monday, March 21, 2016, Tom Lane wrote: > "David G. Johnston" > writes: > > On Monday, March 21, 2016, Tom Lane > > wrote: > >> What about just discarding the old format entirely, and printing one of > >> these two things: > >> > >

Re: [HACKERS] problem with precendence order in JSONB merge operator

2016-03-22 Thread David G. Johnston
On Tue, Mar 22, 2016 at 1:52 PM, Peter Krauss wrote: > Seems that parser not using precedence ideal order, and that casting > obligation losts performance. > > The first problem is self-evident in this example: > > SELECT '{"x":1}'::jsonb || (('{"A":{"y":2}}'::jsonb)->'A') > -- it is ok, expect

Re: [HACKERS] problem with precendence order in JSONB merge operator

2016-03-22 Thread David G. Johnston
Please don't top-post. On Tuesday, March 22, 2016, Peter Krauss wrote: > Subjective notes to contextualize (try to explain on bad-English) my > "precedence order" and JSONB visions: > > JSON datatype is perfect as workaround, and for many simple and less > exigent applications. > JSONB is the "

Re: [HACKERS] PostgreSQL 9.6 behavior change with set returning (funct).*

2016-03-23 Thread David G. Johnston
On Wednesday, March 23, 2016, Tom Lane wrote: > "Regina Obe" > writes: > > In the past couple of weeks our PostGIS tests against PostgreSQL 9.6 dev > > started failing. I traced the issue down to a behavior change in 9.6 > when > > dealing with output of set returning functions when used with (f

Re: [HACKERS] PostgreSQL 9.6 behavior change with set returning (funct).*

2016-03-23 Thread David G. Johnston
On Wed, Mar 23, 2016 at 2:11 PM, Tom Lane wrote: > > ​​ > In the meantime I suppose there's a case to be made for preserving > bug compatibility as much as possible. > > So anyway the question is whether to commit the attached or not. ​+1 for commit - I'll trust Tom on the quality of the patch

Re: [HACKERS] Alter or rename enum value

2016-03-25 Thread David G. Johnston
On Friday, March 25, 2016, Andrew Dunstan wrote: > > On 03/25/2016 04:13 AM, Matthias Kurz wrote: > >> >> Hopefully at the commitfest at least the transaction limitation >> will/could be tackled - that would help us a lot already. >> >> > I don't believe anyone knows how to do that safely. Enums

Re: [HACKERS] Draft release notes for next week's releases

2016-03-27 Thread David G. Johnston
On Sun, Mar 27, 2016 at 8:43 PM, Peter Geoghegan wrote: > On Sat, Mar 26, 2016 at 4:34 PM, Tom Lane wrote: > > Probably the most discussion-worthy item is whether we can say > > anything more about the strxfrm mess. Should we make a wiki > > page about that and have the release note item link t

Re: [HACKERS] Nested funtion

2016-03-27 Thread David G. Johnston
On Sun, Mar 27, 2016 at 9:14 PM, Sridhar N Bamandlapally < sridhar@gmail.com> wrote: > Hi > > Is there any way to create nested function? > > oracle to postgres migration required super function variable reference > into nested function without nested function parameter > > Oracle sample: > --

Re: [HACKERS] SET syntax in INSERT

2016-01-14 Thread David G. Johnston
On Thu, Jan 14, 2016 at 1:07 PM, Tom Lane wrote: > Vitaly Burovoy writes: > > On 1/14/16, Tom Lane wrote: > >> It's more than syntactic sugar; you are going to have to invent > semantics, > >> as well, because it's less than clear what partial-field assignments > >> should do. > >> > >> Assume

Re: [HACKERS] SET syntax in INSERT

2016-01-14 Thread David G. Johnston
On Thu, Jan 14, 2016 at 1:25 PM, Tom Lane wrote: > "David G. Johnston" writes: > > On Thu, Jan 14, 2016 at 1:07 PM, Tom Lane wrote: > >> Vitaly Burovoy writes: > >>> You can't now do something like > >>> INSERT INTO foo (arraycol[2]

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-01-15 Thread David G. Johnston
On Fri, Jan 15, 2016 at 7:49 AM, Tom Lane wrote: > Abhijit Menon-Sen writes: > > I'm looking at an extension that creates some triggers (on user tables) > > dynamically (i.e., not during CREATE EXTENSION, but afterwards). The > > author has two problems with it: > > How do these triggers come to

Re: [HACKERS] Set search_path + server-prepared statements = cached plan must not change result type

2016-01-27 Thread David G. Johnston
On Monday, January 25, 2016, Vladimir Sitnikov wrote: > I want to treat 'prepare' operation as an optimization step, so it is > functionally equivalent to sending a query text. > > In other words, I would like backend to track search_path and other > parameters if necessary transparently‎, creati

Re: [HACKERS] Set search_path + server-prepared statements = cached plan must not change result type

2016-01-28 Thread David G. Johnston
On Thu, Jan 28, 2016 at 7:48 AM, Vladimir Sitnikov < sitnikov.vladi...@gmail.com> wrote: > Robert>Hmm, so in your example, you actually want replanning to be able to > Robert>change the cached plan's result type? > > I want backend to cache _several_ plans behind a single "statement name". > I wan

Re: [HACKERS] "using previous checkpoint record at" maybe not the greatest idea?

2016-02-01 Thread David G. Johnston
On Mon, Feb 1, 2016 at 4:58 PM, Andres Freund wrote: > Hi, > > currently if, when not in standby mode, we can't read a checkpoint > record, we automatically fall back to the previous checkpoint, and start > replay from there. > > Doing so without user intervention doesn't actually seem like a goo

Re: [HACKERS] "using previous checkpoint record at" maybe not the greatest idea?

2016-02-01 Thread David G. Johnston
On Mon, Feb 1, 2016 at 5:48 PM, Andres Freund wrote: > On 2016-02-01 17:29:39 -0700, David G. Johnston wrote: > > ​Learning by reading here... > > > > http://www.postgresql.org/docs/current/static/wal-internals.html > > """ > > ​After a c

Re: [HACKERS] PostgreSQL Auditing

2016-02-02 Thread David G. Johnston
​So, Noah's excellent response has been ignored (from what my threaded Gmail view tells me) at this point...​ On Tue, Feb 2, 2016 at 6:25 PM, Curtis Ruck < curtis.ruck+pgsql.hack...@gmail.com> wrote: > Robert, > > This isn't wrong. I don't see anyone else trying to submit anything in > reference

Re: [HACKERS] PostgreSQL Audit Extension

2016-02-03 Thread David G. Johnston
On Wed, Feb 3, 2016 at 9:36 AM, Robert Haas wrote: > On Wed, Feb 3, 2016 at 10:37 AM, David Steele wrote: > > On 2/1/16 11:23 PM, Robert Haas wrote: > > >> In > >> saying that it's arbitrary, I'm not saying it isn't *useful*. I'm > >> saying there could be five extensions like this that make eq

Re: [HACKERS] "using previous checkpoint record at" maybe not the greatest idea?

2016-02-04 Thread David G. Johnston
On Thu, Feb 4, 2016 at 3:57 PM, Alvaro Herrera wrote: > David G. Johnston wrote: > > > ​Learning by reading here... > > > > http://www.postgresql.org/docs/current/static/wal-internals.html > > """ > > ​After a checkpoint has been made and the

Re: [HACKERS] enable parallel query by default?

2016-02-08 Thread David G. Johnston
On Monday, February 8, 2016, Andres Freund wrote: > Hi, > > On 2016-02-08 16:07:05 -0500, Robert Haas wrote: > > One of the questions I have about parallel query is whether it should > > be enabled by default. That is, should we make the default value of > > max_parallel_degree to a value higher

Re: [HACKERS] proposal: schema PL session variables

2016-02-09 Thread David G. Johnston
On Tue, Feb 9, 2016 at 11:32 AM, Corey Huinker wrote: > > Oh, and I suggest we call them SESSION variables rather than SCHEMA > variables, to reinforce the idea of how long the values in the variables > live. A session variable is in a sense a 1x1 temp table, whose definition > persists across se

Re: [HACKERS] Add schema-qualified relnames in constraint error messages.

2016-02-11 Thread David G. Johnston
On Thu, Feb 11, 2016 at 10:53 AM, Pavel Stehule wrote: > > most recent error in verbose mode, without making a permanent session > >> > state change. Something like >> > >> > regression=# insert into bar values(1); >> > ERROR: insert or update on table "bar" violates foreign key constraint >> "

Re: [HACKERS] planstats.sgml

2016-02-15 Thread David G. Johnston
On Mon, Feb 15, 2016 at 4:23 PM, Tatsuo Ishii wrote: > While reading planstats.sgml, I encounted a sentence which I don't > understand. > > These numbers are current as of the last VACUUM or > ANALYZE on the table. The planner then fetches the > actual current number of pages in the

Re: [HACKERS] The plan for FDW-based sharding

2016-02-23 Thread David G. Johnston
On Tue, Feb 23, 2016 at 9:43 AM, Bruce Momjian wrote: > 4. Cross-node read-write queries: > > This will require a global snapshot manager and global snapshot manager. > Probably meant "global transaction manager" ​David J.​

Re: [HACKERS] temporary table vs array performance

2016-09-26 Thread David G. Johnston
Its considered bad form to post to multiple lists. Please pick the most relevant one - in this case I'd suggest -general. On Mon, Sep 26, 2016 at 8:39 AM, dby...@163.com wrote: > > Array is not convenient to use in function, whether > there are other methods can be replaced temp table in functi

Re: [HACKERS] search path security issue?

2017-10-05 Thread David G. Johnston
On Thu, Oct 5, 2017 at 2:37 PM, Joshua D. Drake wrote: > I get being able to change my search_path on the fly but it seems odd that > as user foo I can change my default search path? > Seems down-right thoughtful of us to allow users to change their own defaults instead of forcing them to always

Re: [HACKERS] search path security issue?

2017-10-05 Thread David G. Johnston
On Thu, Oct 5, 2017 at 3:05 PM, Joshua D. Drake wrote: > On 10/05/2017 02:54 PM, David G. Johnston wrote: > >> On Thu, Oct 5, 2017 at 2:37 PM, Joshua D. Drake > <mailto:j...@commandprompt.com>>wrote: >> >> I get being able to change my search_path on the

[HACKERS] v10 telease note for pg_basebackup refers to old --xlog-method argument

2017-10-17 Thread David G. Johnston
diff --git a/doc/src/sgml/release-10.sgml b/doc/src/sgml/release-10.sgml index 116f7224da..f1f7cfed5f 100644 --- a/doc/src/sgml/release-10.sgml +++ b/doc/src/sgml/release-10.sgml @@ -242,7 +242,7 @@ This changes pg_basebackup's - -X/--xlog-method default to stream. + -X/--w

Re: [HACKERS] Interest in a SECURITY DEFINER function current_user stack access mechanism?

2017-10-18 Thread David G. Johnston
On Wed, Oct 18, 2017 at 1:26 PM, Nico Williams wrote: > On Wed, Oct 18, 2017 at 10:15:01PM +0200, Pavel Stehule wrote: > > there is a function session_user() already > > But it doesn't do this. Are you saying that I should add a > session_user(int)? > > ​Regardless of the merits of the proposed

Re: [HACKERS] Interest in a SECURITY DEFINER function current_user stack access mechanism?

2017-10-18 Thread David G. Johnston
On Wed, Oct 18, 2017 at 2:08 PM, Nico Williams wrote: > On Wed, Oct 18, 2017 at 01:43:30PM -0700, David G. Johnston wrote: > > More useful than this, for me, would be a way to get the top-most user. > > ​That would be "session_user"?​ > Introducing the concept of a

Re: [HACKERS] Interest in a SECURITY DEFINER function current_user stack access mechanism?

2017-10-18 Thread David G. Johnston
On Wed, Oct 18, 2017 at 2:30 PM, Nico Williams wrote: > On Wed, Oct 18, 2017 at 02:13:29PM -0700, David G. Johnston wrote: > > > More useful than this, for me, would be a way to get the top-most user. > > > > That would be "session_user"? > > It's not

[HACKERS] Remove inbound links to sql-createuser

2017-10-30 Thread David G. Johnston
Since CREATE USER is officially an alias for CREATE ROLE other parts of the documentation should point to CREATE ROLE, not CREATE USER. Most do but I noticed when looking at CREATE DATABASE that it did not. Further searching turned up the usage in client-auth.sgml. That one is questionable since

Re: [HACKERS] PostgreSQL 10 parenthesized single-column updates can produce errors

2017-10-31 Thread David G. Johnston
On Tue, Oct 31, 2017 at 3:14 PM, Rob McColl wrote: > >> I believe that this is not an intended change or behavior, but is instead >> an unintentional side effect of 906bfcad7ba7cb3863fe0e2a7810be8e3cd84fbd >> Improve handling of "UPDATE ... SET (column_list) = row_constructor". ( >> https://githu

Re: [HACKERS] PostgreSQL 10 parenthesized single-column updates can produce errors

2017-10-31 Thread David G. Johnston
On Tue, Oct 31, 2017 at 3:43 PM, Tom Lane wrote: > According to the spec, the elements of a parenthesized > SET list should be assigned from the fields of a composite RHS. If > there's just one element of the SET list, the RHS should be a single-field > composite value, and this syntax should re

Re: [HACKERS] Account for cost and selectivity of HAVING quals

2017-10-31 Thread David G. Johnston
On Tue, Oct 31, 2017 at 4:31 PM, Tels wrote: > > ​​ > That looks odd to me, it first uses output_tuples in a formula, then > overwrites the value with a new value. Should these lines be swapped? > ​IIUC it is correct: the additional total_cost comes from processing every output group to check wh

Re: [HACKERS] [PATCH] Add two-arg for of current_setting(NAME, FALLBACK)

2017-11-01 Thread David G. Johnston
On Thu, Mar 19, 2015 at 3:41 PM, David Christensen wrote: > The two-arg form of the current_setting() function will allow a > fallback value to be returned instead of throwing an error when an > unknown GUC is provided. This would come in most useful when using > custom GUCs; e.g.: > > -- retu

Re: [HACKERS] bit|varbit #, xor operator

2016-10-17 Thread David G. Johnston
On Mon, Oct 17, 2016 at 1:39 PM, Jim Nasby wrote: > On 10/17/16 11:29 AM, Tom Lane wrote: > >> Jim Nasby writes: >> >>> On 10/16/16 3:13 PM, Tom Lane wrote: >>> Related to this I'd also like to add a boolean XOR operator as that's a > relatively common request/question. > >> We

Re: [HACKERS] Multiple psql history files

2016-10-18 Thread David G. Johnston
On Tue, Oct 18, 2016 at 9:26 AM, Jonathan Jacobson wrote: > The .psql_history file is naturally used by different DB connections > (distinguished by a different combination of host + port + database + user). > At least in my multi-database working environment, this leads sometimes to > frustratio

Re: [HACKERS] Multiple psql history files

2016-10-18 Thread David G. Johnston
On Tue, Oct 18, 2016 at 9:26 AM, Jonathan Jacobson wrote: > The .psql_history file is naturally used by different DB connections > (distinguished by a different combination of host + port + database + user). > At least in my multi-database working environment, this leads sometimes to > frustratio

Re: [HACKERS] Multiple psql history files

2016-10-18 Thread David G. Johnston
On Tue, Oct 18, 2016 at 9:45 AM, Tom Lane wrote: > Jonathan Jacobson writes: > > The .psql_history file is naturally used by different DB connections > > (distinguished by a different combination of host + port + database + > user). > > At least in my multi-database working environment, this lea

Re: [HACKERS] Multiple psql history files

2016-10-18 Thread David G. Johnston
On Tue, Oct 18, 2016 at 10:21 AM, Tom Lane wrote: > "David G. Johnston" writes: > > On Tue, Oct 18, 2016 at 9:45 AM, Tom Lane wrote: > >> One interesting point, if you wish to consider history as being > >> connection-specific, is what happens during a \c c

Re: [HACKERS] Move pg_largeobject to a different tablespace *without* turning on system_table_mods.

2016-10-19 Thread David G. Johnston
On Wed, Oct 19, 2016 at 9:29 AM, Bruce Momjian wrote: > On Tue, Oct 18, 2016 at 04:51:54PM +0200, Andreas Joseph Krogh wrote: > > > 2. Being able to move pg_largeobject to a different tablespace > > >*without* turning on system_table_mods. This is important for > > >people sto

Re: [HACKERS] Renaming of pg_xlog and pg_clog

2016-10-20 Thread David G. Johnston
On Thu, Oct 20, 2016 at 6:03 PM, Robert Haas wrote: > On Thu, Oct 20, 2016 at 3:46 PM, Tom Lane wrote: > > I'm mostly with Stephen on this. As the names stand, they encourage > > people to go look at the documentation, > > https://www.postgresql.org/docs/devel/static/storage-file-layout.html >

Re: [HACKERS] Mention column name in error messages

2016-11-04 Thread David G. Johnston
On Fri, Nov 4, 2016 at 12:15 PM, Tom Lane wrote: > Michael Paquier writes: > > I am passing that down to a committer for review. The patch looks > > large, but at 95% it involves diffs in the regression tests, > > alternative outputs taking a large role in the bloat. > > This is kind of cute, bu

Re: [HACKERS] gitlab post-mortem: pg_basebackup waiting for checkpoint

2017-02-17 Thread David G. Johnston
On Fri, Feb 17, 2017 at 4:22 PM, Tomas Vondra wrote: > What about adding a paragraph into pg_basebackup docs, explaining that > with 'fast' it does immediate checkpoint, while with 'spread' it'll wait > for a spread checkpoint. > I agree that a better, and self-contained, explanation of the beha

Re: [HACKERS] Make subquery alias optional in FROM clause

2017-02-22 Thread David G. Johnston
On Wed, Feb 22, 2017 at 8:08 AM, Tom Lane wrote: > Bernd Helmle writes: > >> From time to time, especially during migration projects from Oracle to > > PostgreSQL, i'm faced with people questioning why the alias in the FROM > > clause for subqueries in PostgreSQL is mandatory. The default answer

Re: [HACKERS] Make subquery alias optional in FROM clause

2017-02-22 Thread David G. Johnston
On Wed, Feb 22, 2017 at 8:08 AM, Tom Lane wrote: > Or else not generate > a name at all, in which case there simply wouldn't be a way to refer to > the subquery by name; I'm not sure what that might break though. > ​Yeah, usually when I want this I don't end up needing refer by name: First I wr

Re: [HACKERS] Range Partitioning behaviour - query

2017-02-23 Thread David G. Johnston
On Thu, Feb 23, 2017 at 6:17 PM, Amit Langote wrote: > On 2017/02/24 8:38, Venkata B Nagothi wrote: > > On Thu, Feb 23, 2017 at 3:14 PM, Amit Langote wrote: > >> Upper bound of a range partition is an exclusive bound. A note was > added > >> recently to the CREATE TABLE page to make this clear.

Re: [HACKERS] UPDATE of partition key

2017-02-23 Thread David G. Johnston
On Friday, February 24, 2017, Robert Haas wrote: > On Mon, Feb 20, 2017 at 2:58 PM, Amit Khandekar > wrote: > > I am inclined to at least have some option for the user to decide the > > behaviour. In the future we can even consider support for walking > > through the ctid chain across multiple r

Re: [HACKERS] UPDATE of partition key

2017-02-24 Thread David G. Johnston
On Friday, February 24, 2017, Simon Riggs wrote: > > 2. I know that DB2 handles this by having the user specify WITH ROW > MOVEMENT to explicitly indicate they accept the issue and want update > to work even with that. We could have an explicit option to allow > that. This appears to be the only w

Re: [HACKERS] Make subquery alias optional in FROM clause

2017-02-24 Thread David G. Johnston
On Fri, Feb 24, 2017 at 9:35 AM, David Fetter wrote: > > > => SELECT "?column"? FROM (select 1+1 as "?column?", 1+1) AS x; > > ERROR: 42703: column "?column" does not exist > > LINE 2: SELECT "?column"? FROM (select 1+1 as "?column?", 1+1) AS x; > >^ > > HINT: Perhaps you meant

Re: [HACKERS] UPDATE of partition key

2017-02-25 Thread David G. Johnston
On Sat, Feb 25, 2017 at 11:11 AM, Greg Stark wrote: > On 24 February 2017 at 14:57, David G. Johnston > wrote: > > I dislike an error. I'd say that making partition "just work" here is > > material for another patch. In this one an update of the partiti

Re: [HACKERS] bytea_output vs make installcheck

2017-03-09 Thread David G. Johnston
On Thu, Mar 9, 2017 at 4:45 PM, Neha Khatri wrote: > On Fri, Mar 10, 2017 at 6:14 AM, Peter Eisentraut ndquadrant.com> wrote: > >> On 2/14/17 16:50, Jeff Janes wrote: >> > make installcheck currently fails against a server running >> > with bytea_output = escape. >> > >> > Making it succeed is f

Re: [HACKERS] Should we eliminate or reduce HUP from docs?

2017-03-10 Thread David G. Johnston
On Fri, Mar 10, 2017 at 1:02 PM, Alvaro Herrera wrote: > Joshua D. Drake wrote: > > > I am a bad speaker, I am writing a talk three weeks before the conference > > (as opposed to on the plane). > > Hah. > > > I noticed in the docs we still reference the > > passing of SIGHUP for reloading conf fi

Re: [HACKERS] Should we eliminate or reduce HUP from docs?

2017-03-10 Thread David G. Johnston
On Fri, Mar 10, 2017 at 3:28 PM, Alvaro Herrera wrote: > David G. Johnston wrote: > > On Fri, Mar 10, 2017 at 1:02 PM, Alvaro Herrera < > alvhe...@2ndquadrant.com> > > wrote: > > > > There are several ways to cause a config file reload (pg_ctl reload, >

Re: [HACKERS] Should we eliminate or reduce HUP from docs?

2017-03-10 Thread David G. Johnston
On Fri, Mar 10, 2017 at 3:51 PM, Alvaro Herrera wrote: > David G. Johnston wrote: > > On Fri, Mar 10, 2017 at 3:28 PM, Alvaro Herrera < > alvhe...@2ndquadrant.com> > > > is incomplete. > > Sure. We can just reword that along the lines of " ... and when a &

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-11 Thread David G. Johnston
On Sat, Mar 11, 2017 at 5:45 PM, Tom Lane wrote: > > * Whether or not you think it's important not to expand skipped variables, > I think that it's critical that skipped backtick expressions not be > executed. > ​ [...] ​ > I do not think that a skipped \if or \elif > should evaluate its argument

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-12 Thread David G. Johnston
On Sun, Mar 12, 2017 at 10:24 AM, Tom Lane wrote: > > One point here is that we need to distinguish problems in the expression, > which could arise from changing variable values, from some other types of > mistakes like \elif with no preceding \if. When you see something like > that you pretty m

Re: [HACKERS] Our feature change policy

2017-03-20 Thread David G. Johnston
On Mon, Mar 20, 2017 at 8:57 AM, Stephen Frost wrote: > Tom, > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > Stephen Frost writes: > > > * Bruce Momjian (br...@momjian.us) wrote: > > >> 1. make the change now and mention it in the release notes > > >> 2. #1, but also provide backward compatibil

Re: [HACKERS] Our feature change policy

2017-03-20 Thread David G. Johnston
On Mon, Mar 20, 2017 at 9:18 AM, Bruce Momjian wrote: > . #3 and #4 would need to be weighted depending on > whether choosing them would delay progress, e.g. it did delay progress > on standard-conforming strings, but the delay was determined to be > reasonable. > w.r.t. standard-conforming str

Re: [HACKERS] /proc/self/oom_adj is deprecated in newer Linux kernels

2014-06-10 Thread David G Johnston
In short: I can accept the idea that picking reasonable specific values is impossible so let's just ensure that children are always killed before the parent (basically the default behavior). If you then say that any system that is capable of implementing that rule should have it set then leaving i

Re: [HACKERS] /proc/self/oom_adj is deprecated in newer Linux kernels

2014-06-10 Thread David G Johnston
Gurjeet Singh-4 wrote > Even if the clueless DBA tries to set the oom_score_adj below that of > Postmaster, Linux kernel prevents that from being done. I demonstrate > that in the below screen share. I used GUC as well as plain command > line to try and set a child's badness (oom_score_adj) to be l

Re: [HACKERS] PL/pgSQL support to define multi variables once

2014-06-13 Thread David G Johnston
Tom Lane-2 wrote > Andres Freund < > andres@ > > writes: >> On 2014-06-13 16:12:36 +0200, Pavel Stehule wrote: >>> Quan' example is 100% valid in SQL/PSM and what I read about ADA then in >>> ADA too. > >> So what? plpgsql is neither language and this doesn't seem to be the way >> to make them a

Re: [HACKERS] Audit of logout

2014-06-13 Thread David G Johnston
Tom Lane-2 wrote > Another answer is to make both variables PGC_SIGHUP, on the grounds > that it doesn't make much sense for them not to be applied system-wide; > except that I think there was some idea that logging might be enabled > per-user or per-database using ALTER ROLE/DATABASE. >From a tro

Re: [HACKERS] comparison operators

2014-06-18 Thread David G Johnston
Andrew Dunstan wrote > On 06/17/2014 07:25 PM, Andres Freund wrote: >> On 2014-06-17 19:22:07 -0400, Tom Lane wrote: >>> Andrew Dunstan < > andrew@ > > writes: I went to have a look at documenting the jsonb comparison operators, and found that the docs on comparison operators conta

Re: [HACKERS] idle_in_transaction_timeout

2014-06-18 Thread David G Johnston
On Wed, Jun 18, 2014 at 8:01 PM, Josh Berkus [via PostgreSQL] < ml-node+s1045698n5807868...@n5.nabble.com> wrote: > On 06/18/2014 04:54 PM, Marko Tiikkaja wrote: > > On 2014-06-19 1:46 AM, Josh Berkus wrote: > >> Robert's right, not killing the "BEGIN;" only transactions is liable to > >> result i

Re: [HACKERS] idle_in_transaction_timeout

2014-06-19 Thread David G Johnston
On Thu, Jun 19, 2014 at 12:40 PM, Abhijit Menon-Sen-2 [via PostgreSQL] < ml-node+s1045698n5808016...@n5.nabble.com> wrote: > At 2014-06-19 17:53:17 +0200, [hidden email] > wrote: > > > > I much prefer with "in" but it doesn't much matter. > >

Re: [HACKERS] idle_in_transaction_timeout

2014-06-22 Thread David G Johnston
On Sunday, June 22, 2014, Kevin Grittner-5 [via PostgreSQL] < ml-node+s1045698n580830...@n5.nabble.com> wrote: > Andres Freund <[hidden email] > > wrote: > > > I think we'll want a version of this that just fails the > > transaction once we hav

Re: [HACKERS] idle_in_transaction_timeout

2014-06-23 Thread David G Johnston
> > > >>> > >>> I think that'd be rather confusing. For one it'd need to be > >>> idle_in_transaction_timeout > > Why? We're cancelling an idle transaction, not an "idle in > transaction", whatever that is. > > ​The confusion derives from the fact we are affecting a session whose state is "idle in

Re: [HACKERS] idle_in_transaction_timeout

2014-06-23 Thread David G Johnston
> > > A long idle in transaction state pretty much always indicates a > > problematic interaction with postgres. > > True. Which makes me wonder whether we shouldn't default this to > something non-zero -- even if it is 5 or 10 days. ​I guess it depends on how parental we want to be. But if we

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread David G Johnston
On Tue, Jun 24, 2014 at 9:20 AM, Vik Fearing [via PostgreSQL] < ml-node+s1045698n5808882...@n5.nabble.com> wrote: > On 06/22/2014 05:11 PM, Kevin Grittner wrote: > > I found one substantive issue that had been missed in discussion, > > though. The patch modifies the postgres_fdw extension to make

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread David G Johnston
On Tue, Jun 24, 2014 at 10:05 AM, Robert Haas [via PostgreSQL] < ml-node+s1045698n580889...@n5.nabble.com> wrote: > On Tue, Jun 24, 2014 at 9:18 AM, Vik Fearing <[hidden email] > > wrote: > > > On 06/22/2014 05:11 PM, Kevin Grittner wrote: > >>

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread David G Johnston
On Tue, Jun 24, 2014 at 11:11 AM, Robert Haas [via PostgreSQL] < ml-node+s1045698n5808915...@n5.nabble.com> wrote: > On Tue, Jun 24, 2014 at 10:50 AM, Vik Fearing <[hidden email] > > wrote: > > > On 06/24/2014 04:04 PM, Robert Haas wrote: > >>>

[HACKERS] Re: how can i prevent materialized views from refreshing during pg_restore

2014-06-26 Thread David G Johnston
bithead wrote > I asked a question over on StackOverflow, and Craig Ringer told me to > report it here. > > http://stackoverflow.com/questions/24413161/how-can-i-prevent-materialized-views-from-refreshing-during-pg-restore > > I have created a dump of the database using pg_dump in "custom" format

Re: [HACKERS] Can simplify 'limit 1' with slow function?

2014-07-01 Thread David G Johnston
Merlin Moncure-2 wrote > On Tue, Jul 1, 2014 at 2:16 PM, Martijn van Oosterhout > < > kleptog@ > > wrote: >> On Sun, Jun 29, 2014 at 10:05:50PM +0800, gotoschool6g wrote: >>> The simplified scene: >>> select slowfunction(s) from a order by b limit 1; >>> is slow than >>> select slowfunction(s) fr

  1   2   3   4   5   6   7   >