Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance

2019-02-02 Thread Andrew Gierth
> "Lætitia" == Lætitia Avrot writes: [snip patch] The spec doesn't require the inverse functions (asinh, acosh, atanh), but surely there is no principled reason to omit them? -- Andrew (irc:RhodiumToad)

Re: Removing \cset from pgbench

2019-02-02 Thread Fabien COELHO
Hola Alvaro, In reply to https://postgr.es/m/alpine.DEB.2.21.1901102211350.27692@lancre wherein Fabien wrote: I'm not very happy with the resulting syntax, but IMO the feature is useful. My initial design was to copy PL/pgSQL "into" with some "\into" orthogonal to \; and ;, but the

Re: Synchronize with imath upstream

2019-02-02 Thread Andrew Gierth
> "Noah" == Noah Misch writes: Noah> - # -Wdeclaration-after-statement isn't applicable for C++ Noah> + # -Wdeclaration-after-statement isn't applicable for C++. Specific C files Noah> + # disable it, so AC_SUBST the negative form. Noah> + PERMIT_DECLARATION_AFTER_STATEMENT= Noah>

Re: pg_dump multi VALUES INSERT

2019-02-02 Thread David Rowley
On Sat, 2 Feb 2019 at 21:26, Fabien COELHO wrote: > I do not understand why dump_inserts declaration has left the "flags for > options" section. I moved that because it's no longer just a flag. It now stores an int value. > I'd suggest not to rely on "atoi" because it does not check the

Re: Synchronize with imath upstream

2019-02-02 Thread Andrew Gierth
> "Noah" == Noah Misch writes: >> I found it much simpler to strip out -Wdeclaration-after-statement >> instead: >> >> $(RYU_OBJS): override CFLAGS := $(filter-out >> -Wdeclaration-after-statement,$(CFLAGS)) Noah> The -Wno-declaration-after-statement approach takes eight lines

Re: Able to do ALTER DEFAULT PRIVILEGES from a user who is not the owner

2019-02-02 Thread rajan
Andrew, Another question, If the user student is not the owner of the Schema(additional) and has only USAGE / no privileges, How come it is able to modify permissions at schema level? - -- Thanks, Rajan. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html

Re: Able to do ALTER DEFAULT PRIVILEGES from a user who is not the owner

2019-02-02 Thread Andrew Gierth
> "rajan" == rajan writes: rajan> Andrew, rajan> Another question, If the user student is not the owner of the rajan> Schema(additional) and has only USAGE / no privileges, How come rajan> it is able to modify permissions at schema level? Because it's not modifying anything that

Re: Synchronize with imath upstream

2019-02-02 Thread Noah Misch
On Sun, Feb 03, 2019 at 06:01:51AM +, Andrew Gierth wrote: > > "Noah" == Noah Misch writes: > > Noah> If the compiler supports -Wdeclaration-after-statement, I add > Noah> -Wno-declaration-after-statement for imath.c. > > I found it much simpler to strip out

UNIQUE_PATH_NOOP is dead code?

2019-02-02 Thread Tom Lane
I happened to notice while looking at code coverage reports that (1) the portions of create_unique_path() that report that the input relation is already known unique are no longer reached in our regression tests; (2) the loop in relation_has_unique_index_for() that deals with an exprlist and

Synchronize with imath upstream

2019-02-02 Thread Noah Misch
pgcrypto bundles a copy of the imath library for arbitrary-precision integer arithmetic in non-SSL builds. Upstream fixed buffer overflows through the years, and commit 8b59672 brought those fixes into PostgreSQL. In master, I would like to fully resynchronize with fresh imath 1.29. We're

Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance

2019-02-02 Thread Lætitia Avrot
Hi Alvaro, Thank you so much for taking the time to review the patch and for taking the time again to sort things out with me this evening. > I see that in dtanh() you set errno to 0 before calling tanh(), but 1) > you don't check for it afterwards (seems like you should be checking for >

Re: ATTACH/DETACH PARTITION CONCURRENTLY

2019-02-02 Thread David Rowley
On Sat, 2 Feb 2019 at 09:31, Robert Haas wrote: > After having written this code, I'm still torn about whether to go > further with this design. On the one hand, this is such boilerplate > code that it's kinda hard to imagine it having too many more bugs; on > the other hand, as you can see,

Re: initdb --allow-group-access behaviour in windows

2019-02-02 Thread Michael Paquier
On Sat, Feb 02, 2019 at 08:50:14AM +0200, David Steele wrote: > How about: > > +files created by initdb. This option is ignored > +on Windows, which does not support > +POSIX-style group permissions. Fine for me. Anybody else has an opinion to offer? -- Michael

Re: Refactoring IndexPath representation of index conditions

2019-02-02 Thread Tom Lane
Andres Freund writes: > On 2019-02-02 11:29:10 -0500, Tom Lane wrote: >> I think that the original idea here was that we should do as little >> work as possible "up front", since most index paths will get discarded >> before we reach createplan.c. But to the extent that that was valid >> at all,

Re: Changing SQL Inlining Behaviour (or...?)

2019-02-02 Thread Tom Lane
Further question about this ... I'm thinking about exactly when indxpath.c should interrogate extensions' planner support functions. Since it'll cost some cycles to look up and call such functions, we don't want to do it if there's little or no chance of getting an index match. Currently, what

Re: Refactoring IndexPath representation of index conditions

2019-02-02 Thread Andres Freund
Hi, On 2019-02-02 11:29:10 -0500, Tom Lane wrote: > I think that the original idea here was that we should do as little > work as possible "up front", since most index paths will get discarded > before we reach createplan.c. But to the extent that that was valid > at all, it's gotten overtaken

Re: Early WIP/PoC for inlining CTEs

2019-02-02 Thread Tom Lane
I wrote: > I propose that we implement and document this as > WITH ctename AS [ MATERIALIZE { ON | OFF } ] ( query ) > which is maybe a bit clunky but not awful, and it would leave room > to generalize it to "AS [ optionname optionvalue [ , ... ] ]" if we > ever need to. Looking at the

Re: Able to do ALTER DEFAULT PRIVILEGES from a user who is not the owner

2019-02-02 Thread rajan
THanks for the response, Andrew. - -- Thanks, Rajan. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html

Re: New vacuum option to do only freezing

2019-02-02 Thread Alvaro Herrera
On 2019-Feb-01, Bossart, Nathan wrote: > IMHO we could document this feature at a slightly higher level without > leaving out any really important user-facing behavior. Here's a quick > attempt to show what I am thinking: > > With this option, VACUUM skips all index cleanup behavior and

Removing \cset from pgbench

2019-02-02 Thread Alvaro Herrera
Hello In reply to https://postgr.es/m/alpine.DEB.2.21.1901102211350.27692@lancre wherein Fabien wrote: > I'm not very happy with the resulting syntax, but IMO the feature is useful. > My initial design was to copy PL/pgSQL "into" with some "\into" orthogonal > to \; and ;, but the implementation

Refactoring IndexPath representation of index conditions

2019-02-02 Thread Tom Lane
I've been poking at the problem discussed in a couple of recent threads of letting extensions in on the ability to create "lossy index conditions" for complex operators/functions. The current design for that in indxpath.c is frankly just a pile of kluges of varying ages. In the initial pass, the

Re: [HACKERS] Block level parallel vacuum

2019-02-02 Thread Masahiko Sawada
On Thu, Jan 31, 2019 at 10:18 PM Masahiko Sawada wrote: > > Thank you. I'll submit the updated patch set. > Attached the latest patch set. Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center From 021a179d7696183394db60aedbd1acb0301ad4b0 Mon

Re: fast defaults in heap_getattr vs heap_deform_tuple

2019-02-02 Thread Andres Freund
Hi, On 2019-02-02 05:35:21 -0800, Andres Freund wrote: > This breaks HOT (and probably also foreign keys), when fast default > columns are set to NULL, because HeapDetermineModifiedColumns() gets the > values with heap_getattr(), which returns a spurious NULL for the old > value (instead of the

Re: Able to do ALTER DEFAULT PRIVILEGES from a user who is not the owner

2019-02-02 Thread Andrew Gierth
> "rajan" == rajan writes: rajan> --with the student user have no privilege how ALTER DEFAULT PRIVILEGES rajan> works rajan> *learning=> ALTER DEFAULT PRIVILEGES IN SCHEMA additional GRANT INSERT ON rajan> TABLES TO student; This ALTER only affects the default privileges for

Re: [HACKERS] Block level parallel vacuum

2019-02-02 Thread Masahiko Sawada
On Sat, Feb 2, 2019 at 4:06 AM Amit Kapila wrote: > > On Fri, Feb 1, 2019 at 2:49 AM Masahiko Sawada wrote: > > > > On Wed, Jan 30, 2019 at 2:06 AM Haribabu Kommi > > wrote: > > > > Thank you. I'll submit the updated patch set. > > > > I don't see any chance of getting this committed in the

Re: fast defaults in heap_getattr vs heap_deform_tuple

2019-02-02 Thread Andres Freund
Hi, On 2019-02-01 08:24:04 -0800, Andres Freund wrote: > While working on the patch to slotify trigger.c I got somewhat confused > by the need to expand tuples in trigger.c: > > static HeapTuple > GetTupleForTrigger(EState *estate, >EPQState *epqstate, >

Re: DNS SRV support for LDAP authentication

2019-02-02 Thread Thomas Munro
On Sat, Feb 2, 2019 at 10:34 PM Graham Leggett wrote: > On 02 Feb 2019, at 01:57, Thomas Munro wrote: > > On Sat, Feb 2, 2019 at 9:25 AM Graham Leggett wrote: > >> Does this support SSL/TLS? > > I didn't try it myself but I found several claims that it works. I > > see complaints that it

Re: fast defaults in heap_getattr vs heap_deform_tuple

2019-02-02 Thread Andres Freund
Him On 2019-02-01 14:49:05 -0800, Andres Freund wrote: > +#ifdef IAM_THE_WRONG_FIX > if (HeapTupleHeaderGetNatts(tuple.t_data) < relation->rd_att->natts) > result = heap_expand_tuple(, relation->rd_att); > else > result = heap_copytuple(); > +#else > +

Able to do ALTER DEFAULT PRIVILEGES from a user who is not the owner

2019-02-02 Thread rajan
Please help to understand the following. Where the User(who is not the owner of a table) is able to ALTER DEFAULT PRIVILEGES and GRANT SELECT rights for all tables Is providing USAGE on schema is enough to do that? How is this secure? learning=> select current_user; current_user

Re: WIP: Avoid creation of the free space map for small tables

2019-02-02 Thread Amit Kapila
On Sat, Feb 2, 2019 at 7:30 AM Amit Kapila wrote: > > On Mon, Jan 28, 2019 at 4:40 PM Amit Kapila wrote: > > > > On Mon, Jan 28, 2019 at 10:03 AM John Naylor > > wrote: > > In the past few days, we have done a further analysis of each problem > and tried to reproduce it. We are successful in

Re: DNS SRV support for LDAP authentication

2019-02-02 Thread Graham Leggett
On 02 Feb 2019, at 01:57, Thomas Munro wrote: > On Sat, Feb 2, 2019 at 9:25 AM Graham Leggett wrote: >> On 25 Sep 2018, at 04:09, Thomas Munro wrote: >>> Some people like to use DNS SRV records to advertise LDAP servers on >>> their network. Microsoft Active Directory is usually (always?) set

Spurious "apparent wraparound" via SimpleLruTruncate() rounding

2019-02-02 Thread Noah Misch
While testing an xidStopLimit corner case, I got this: 3656710 2019-01-05 00:05:13.910 GMT LOG: automatic aggressive vacuum to prevent wraparound of table "test.pg_toast.pg_toast_826": index scans: 0 3656710 2019-01-05 00:05:16.912 GMT LOG: could not truncate directory "pg_xact": apparent

Re: pg_dump multi VALUES INSERT

2019-02-02 Thread Fabien COELHO
Hello David, Wondering if you have anything else here? I'm happy for the v13 version to be marked as ready for committer. I still have a few comments. Patch applies cleanly, compiles, global & local make check are ok. Typos and style in the doc: "However, since, by default this

Re: pgsql: Remove references to Majordomo

2019-02-02 Thread Noah Misch
On Mon, Jan 28, 2019 at 07:29:39PM +0100, Magnus Hagander wrote: > On Mon, Jan 28, 2019 at 7:26 PM Tom Lane wrote: > > Stephen Frost writes: > > >> On Sun, Jan 27, 2019 at 2:28 AM Noah Misch wrote: > > >>> What are those blocked infrastructure improvements? > > > > > The specific improvements