Re: Have I found an interval arithmetic bug?

2021-04-02 Thread Zhihong Yu
Bruce: In src/interfaces/ecpg/pgtypeslib/interval.c, how about the following places ? Around line 158: case 'Y': tm->tm_year += val; tm->tm_mon += (fval * MONTHS_PER_YEAR); Around line 194: tm->tm_year += val;

Re: Making wait events a bit more efficient

2021-04-02 Thread Andres Freund
Hi, On 2021-04-02 12:44:58 -0700, Andres Freund wrote: > If we went for the my_wait_event_info approach there is one further > advantage, after my change to move the wait event code into a separate > file: wait_event.h does not need to include proc.h anymore, which seems > architecturally nice for

Re: Have I found an interval arithmetic bug?

2021-04-02 Thread Bruce Momjian
On Fri, Apr 2, 2021 at 07:53:35PM -0700, Zhihong Yu wrote: > Bruce: > In src/interfaces/ecpg/pgtypeslib/interval.c, how about the following places ? > > Around line 158: >                 case 'Y': >                     tm->tm_year += val; >                     tm->tm_mon += (fval * MONTHS_PER_YE

Re: SQL-standard function body

2021-04-02 Thread Julien Rouhaud
On Fri, Apr 02, 2021 at 02:25:15PM +0200, Peter Eisentraut wrote: > > New patch attached. Thanks, it all looks good to me. I just spot a few minor formatting issues: @@ -2968,6 +2973,13 @@ pg_get_functiondef(PG_FUNCTION_ARGS) } /* And finally the function definition ... */ + tmp = Sy

Re: shared-memory based stats collector

2021-04-02 Thread Andres Freund
Hi, On 2021-03-16 12:54:40 -0700, Andres Freund wrote: > I did consider command_progress.c too - but that seems confusing because > there's src/include/commands/progress.h, which is imo a different layer > than what pgstat/backend_progress provide. So I thought splitting things > up so that backen

Re: [PATCH] Implement motd for PostgreSQL

2021-04-02 Thread Joel Jacobson
On Fri, Apr 2, 2021, at 22:51, Bruce Momjian wrote: > On Fri, Apr 2, 2021 at 10:46:16PM +0200, Joel Jacobson wrote: > > Dear fellow hackers, > > > > This patch is one day late, my apologies for missing the deadline this year. > > Uh, the deadline for the last commitfest was March 1, 2021, not Ap

Re: [PATCH] Implement motd for PostgreSQL

2021-04-02 Thread Joel Jacobson
On Sat, Apr 3, 2021, at 04:47, Michael Paquier wrote: > On Fri, Apr 02, 2021 at 10:46:16PM +0200, Joel Jacobson wrote: > > Ascii elephant in example by Michael Paquier [1], with ANSI colors added by > > me. > > > > [1] > > https://www.postgresql.org/message-id/CAB7nPqRaacwcaANOYY3Hxd3T0No5RdZXyq

Re: [PATCH] Implement motd for PostgreSQL

2021-04-02 Thread Joel Jacobson
On Fri, Apr 2, 2021, at 22:59, Chapman Flack wrote: > Slonik's backslashes are falling off. Eww. > > Regards, > -Chap Thanks for the bug report. Fixed by properly escaping backslackes: ALTER SYSTEM SET motd TO E'\u001B[94m' '\n __ ___ ' '\n /)/ \\/ \\ ' '\n ( / __

Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

2021-04-02 Thread Bharath Rupireddy
On Sat, Apr 3, 2021 at 1:29 AM Peter Eisentraut wrote: > The code you have in merge_publications() to report all existing > publications is pretty messy and is not properly internationalized. I > think what you are trying to do there is excessive. Compare this > similar case: > > create table t1

Re: [PATCH] Implement motd for PostgreSQL

2021-04-02 Thread Joel Jacobson
On Fri, Apr 2, 2021, at 23:09, Marko Tiikkaja wrote: > Hi Joel > > On Fri, Apr 2, 2021 at 11:47 PM Joel Jacobson wrote: >> PostgreSQL has since long been suffering from the lack of a proper UNIX >> style motd (message of the day). > > First of all, thanks for your work on this! I think this is

<    1   2