Re: Conflicting option checking in pg_restore

2018-10-28 Thread Daniel Gustafsson
> On 28 Oct 2018, at 19:42, Fabien COELHO wrote: >>> Function RestoreArchive is called both from pg_dump & pg_restore, so now >>> the sanity check is not performed for the former (which does not have the >>> -1 option, though). Moreover, the function is noted "Public", which may >>> suggest that

Re: Ordered Partitioned Table Scans

2018-10-28 Thread David Rowley
Thanks for looking at this. On 28 October 2018 at 03:49, Julien Rouhaud wrote: > I just had a look at your patch. I see that you implemented only a > subset of the possible optimizations (only the case for range > partitionoing without subpartitions). This has been previously > discussed, but

Re: COPY FROM WHEN condition

2018-10-28 Thread Tomas Vondra
Hi, I've taken a quick look at this on the way back from pgconf.eu, and it seems like a nice COPY improvement in a fairly good shape. Firstly, I think it's a valuable because it allows efficiently importing a subset of data. Currently, we either have to create an intermediate table, copy all the

Re: [HACKERS] [PATCH] Incremental sort

2018-10-28 Thread Tomas Vondra
Hi Alexander, On 06/01/2018 04:22 PM, Alexander Korotkov wrote: > Hi, James! > > On Thu, May 31, 2018 at 11:10 PM James Coleman > wrote: > > I've attached an updated copy of the patch that applies cleanly to > current master. > > > Thank you for rebasing this

Re: SQL:2011 PERIODS vs Postgres Ranges?

2018-10-28 Thread Paul Jungwirth
Hi Jeff, Thanks for sharing your thoughts and encouragement! :-) > The model in [7] is > based heavily on pack/unpack operators, and it's hard for me to see > how those fit into SQL. Also, the pack/unpack operators have some > theoretical weirdness that the book does not make clear*. > > *: My

Re: Multiple Wait Events for extensions

2018-10-28 Thread Michael Paquier
On Sun, Oct 28, 2018 at 10:12:48AM -0700, legrand legrand wrote: > An other idea that may be called a "better wait event error handling" > would have be to display: > > "???-xx" unknown event type (xx being the associated number) > in pgstat_get_wait_event_type() > > "unknown wait event - yy"

Re: GiST VACUUM

2018-10-28 Thread Andrey Borodin
Hi everyone! > 2 окт. 2018 г., в 6:14, Michael Paquier написал(а): > Andrey, your latest patch does not apply. I am moving this to the next > CF, waiting for your input. I'm doing preps for CF. Here's rebased version. Best regards, Andrey Borodin.

Re: Conflicting option checking in pg_restore

2018-10-28 Thread Daniel Gustafsson
> Could you add the patch to the CF app? > > https://commitfest.postgresql.org/20/ Done. >> Checking for conflicting options in pg_restore was mostly done in main() with >> one check deferred until RestoreArchive(). Reading the git history makes it >> seem like it simply happened, without the

Re: jsonpath

2018-10-28 Thread Tomas Vondra
Hi, On 10/02/2018 04:33 AM, Michael Paquier wrote: > On Sat, Sep 08, 2018 at 02:21:27AM +0300, Nikita Glukhov wrote: >> Attached 18th version of the patches rebased onto the current master. > > Nikita, this version fails to apply, as 0004 has conflicts with some > regression tests. Could you

Re: Conflicting option checking in pg_restore

2018-10-28 Thread Michael Paquier
On Sun, Oct 28, 2018 at 10:02:02PM +0100, Daniel Gustafsson wrote: >> On 28 Oct 2018, at 19:42, Fabien COELHO wrote: Function RestoreArchive is called both from pg_dump & pg_restore, so now the sanity check is not performed for the former (which does not have the -1 option,

Re: FETCH FIRST clause WITH TIES option

2018-10-28 Thread Tomas Vondra
Hello Surafel, On 10/26/2018 12:28 PM, Surafel Temesgen wrote: > hello , > > The WITH TIES keyword is sql standard that specifies any peers of > retained rows to retained in the result set too .which means > according to ordering key the result set can includes additional rows > which have

Re: SQL:2011 PERIODS vs Postgres Ranges?

2018-10-28 Thread Jeff Davis
On Sun, 2018-10-21 at 22:10 +0300, Heikki Linnakangas wrote: > On 21/10/2018 21:17, Paul A Jungwirth wrote: > > 3. Build our own abstractions on top of ranges, and then use those > > to > > implement PERIOD-based features. This is the least clear option, > > and I > > imagine it would require a

Re: INSTALL file

2018-10-28 Thread Andrew Dunstan
On 10/28/2018 08:13 AM, Andreas 'ads' Scherbaum wrote: Hello, while working with Google Code-In students, there is one task: "clone PostgreSQL from git repository, and build from source". This brought up an interesting problem: the README refers to an "INSTALL" file, which is present in

Re: Conflicting option checking in pg_restore

2018-10-28 Thread Fabien COELHO
Hello Narayanan, There is a possible catch: Function RestoreArchive is called both from pg_dump & pg_restore, so now the sanity check is not performed for the former (which does not have the -1 option, though). Moreover, the function is noted "Public", which may suggest that external tools

Re: Pluggable Storage - Andres's take

2018-10-28 Thread Dmitry Dolgov
> On Fri, 26 Oct 2018 at 13:25, Haribabu Kommi wrote: > > Here I attached the cumulative patch with all fixes that are shared in > earlier mails by me. > Except fast_default test, rest of test failures are fixed. Hi, If I understand correctly, these patches are for the branch

Re: Conflicting option checking in pg_restore

2018-10-28 Thread Fabien COELHO
Hallå Daniel, Checking for conflicting options in pg_restore was mostly done in main() with one check deferred until RestoreArchive(). Reading the git history makes it seem like it simply happened, without the disjoint checking being intentional. Am I reading it right that we can consolidate

Re: Multiple Wait Events for extensions

2018-10-28 Thread legrand legrand
Michael Paquier-2 wrote > On Wed, Oct 24, 2018 at 11:18:13AM -0700, legrand legrand wrote: >> Would a hard coded solution as described here after possible for >> mid-term? > > I don't think I would commit that as we would want a better solution > with custom names, but patching Postgres to do so

Re: Ltree: set of allowed charcters is limited to [A-Za-z0-9_]. Could the dash "-" be included?

2018-10-28 Thread joernbs
Hello David, I think this is a misunderstanding. The seperator in ltree is the dot (.) , of cause I did not asked to change that. I asked about to expand allowed characters in the ltree-string [A-Za-z0-9_] to [a-zA-Z0-9_/- ] including dash(-), slash(/) and whitespace( ), common charcaters in

Re: Conflicting option checking in pg_restore

2018-10-28 Thread Narayanan V
Hi On Sun, Oct 28, 2018 at 12:25 PM Fabien COELHO wrote: > > Hallå Daniel, > > > Checking for conflicting options in pg_restore was mostly done in main() > with > > one check deferred until RestoreArchive(). Reading the git history > makes it > > seem like it simply happened, without the

INSTALL file

2018-10-28 Thread Andreas 'ads' Scherbaum
Hello, while working with Google Code-In students, there is one task: "clone PostgreSQL from git repository, and build from source". This brought up an interesting problem: the README refers to an "INSTALL" file, which is present in packages, but not in the source repo. This is very confusing

Re: CVE-2017-7484-induced bugs, or, btree cmp functions are not leakproof?

2018-10-28 Thread Dilip Kumar
On Sat, Oct 27, 2018 at 10:07 AM Dilip Kumar wrote: > > On Fri, Oct 26, 2018 at 1:12 PM Amit Langote > wrote: > > > > On 2018/10/25 19:54, Dilip Kumar wrote: > > > On Mon, Oct 22, 2018 at 7:47 PM Tom Lane wrote: > > >> Amit Langote writes: > > >>> But maybe for the case under question, that's

Re: Multiple Wait Events for extensions

2018-10-28 Thread legrand legrand
Michael Paquier-2 wrote > On Wed, Oct 24, 2018 at 11:18:13AM -0700, legrand legrand wrote: >> Would a hard coded solution as described here after possible for >> mid-term? > > I don't think I would commit that as we would want a better solution > with custom names, but patching Postgres to do so

Re: [PATCH] Tab complete EXECUTE FUNCTION for CREATE (EVENT) TRIGGER

2018-10-28 Thread Michael Paquier
On Fri, Oct 26, 2018 at 05:11:59PM +0100, Dagfinn Ilmari Mannsåker wrote: > Thanks! I've updated the commitfest entry with you as the committer and > Tom as the reviewer, and marked it as committed. Thanks a lot for updating the CF app. I have been a bit sloppy here. -- Michael signature.asc

Re: partition tree inspection functions

2018-10-28 Thread Michael Paquier
On Fri, Oct 19, 2018 at 06:55:09PM +0900, Amit Langote wrote: > Yeah, we could make it the responsibility of the callers of > find_all_inheritors and find_inheritance_children to check relhassubclass > as an optimization and remove any reference to relhassubclass from > pg_inherits.c. Although we

why commutator doesn't work?

2018-10-28 Thread Pavel Stehule
Hi I try to create operator + for varchar and integer with Oracle behave. create or replace function sum(varchar, int) returns int as $$ select $1::int + $2 $$ language sql; create operator + (function = sum, leftarg = varchar, rightarg = int, commutator = +); create table foo2(a varchar);

RE: COPY FROM WHEN condition

2018-10-28 Thread myungkyu.lim
Hello, Basically, this patch worked very well in my tests. > 3) For COPY TO, the WHEN clause is accepted but ignored, leading to confusing > cases like this: I found same issue. postgres=# copy t1 to '/home/lmk/t1.data' when c1 < 1; In the 'COPY TO' statement, 'WHEN clause' does not do

Re: Pluggable Storage - Andres's take

2018-10-28 Thread Haribabu Kommi
On Mon, Oct 29, 2018 at 7:40 AM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > On Fri, 26 Oct 2018 at 13:25, Haribabu Kommi > wrote: > > > > Here I attached the cumulative patch with all fixes that are shared in > earlier mails by me. > > Except fast_default test, rest of test failures are

RE: [Proposal] Add accumulated statistics for wait event

2018-10-28 Thread Yotsunaga, Naoki
On Thu, Oct 4, 2018 at 8:22 PM, Yotsunaga Naoki wrote: Hi, I understood and thought of your statistic comment once again. In the case of sampling, is there enough statistic to investigate? In the case of a long SQL, I think that it is possible to obtain a sufficient sampling number. However,