Re: Displaying chat by punished users only to themselves (db fiddle attached)

2022-05-05 Thread Alexander Farber
Good morning, this is a very insightful comment (among many) by you, David - On Wed, May 4, 2022 at 5:40 PM David G. Johnston wrote: > Well, that is basically why I was going on about the oddity of having > social be a part of the main query. Personally I would write it as > "myself.uid = in_ui

Re: Displaying chat by punished users only to themselves (db fiddle attached)

2022-05-05 Thread Alexander Farber
Good evening, I still have a problem with my JOIN expression - when I add more games, then messages from other games are displayed: https://dbfiddle.uk/?rdbms=postgres_14&fiddle=e2ff211f59090d1eeab879498148f907 CREATE OR REPLACE FUNCTION words_get_chat( in_gid integer,

Re: Displaying chat by punished users only to themselves (db fiddle attached)

2022-05-05 Thread David G. Johnston
On Thursday, May 5, 2022, Alexander Farber wrote: > Good evening, I still have a problem with my JOIN expression - > when I add more games, then messages from other games are displayed: > > https://dbfiddle.uk/?rdbms=postgres_14&fiddle= > e2ff211f59090d1eeab879498148f907 > > CREATE OR REPLACE FUN

Re: Displaying chat by punished users only to themselves (db fiddle attached)

2022-05-05 Thread Alexander Farber
Thank you, that was it!

Psycopg3 fails to resolve 'timezone localtime' on MacOS

2022-05-05 Thread Jerry Sievers
Has anyone run into This? Psycopg3 fails to resolve timezone localtime on MacOS (Catalina). It falls back to UTC regardless of whether running with/without the tzdata package which I did try. There is a /etc/localtime symlink on this box pointed at the correct file in the tz data directory, whic

Re: Psycopg3 fails to resolve 'timezone localtime' on MacOS

2022-05-05 Thread Tom Lane
Jerry Sievers writes: > Psycopg3 fails to resolve timezone localtime on MacOS (Catalina). I doubt Postgres will accept that zone name anywhere. It's not a standard name as far as the tzdb data set is concerned. (Having said that, it's far from clear to me whether this code fragment is trying to

Re: Psycopg3 fails to resolve 'timezone localtime' on MacOS

2022-05-05 Thread Daniele Varrazzo
On Fri, 6 May 2022 at 03:04, Jerry Sievers wrote: > > Has anyone run into This? > > Psycopg3 fails to resolve timezone localtime on MacOS (Catalina). That warning is typical on Windows, which doesn't have a system timezone database, and on minimal Alpine installations, where the apk package 'tzda

Re: Psycopg3 fails to resolve 'timezone localtime' on MacOS

2022-05-05 Thread Jerry Sievers
> On May 5, 2022, at 8:29 PM, Tom Lane wrote: > > Jerry Sievers writes: >> Psycopg3 fails to resolve timezone localtime on MacOS (Catalina). > > I doubt Postgres will accept that zone name anywhere. It's > not a standard name as far as the tzdb data set is concerned. > > (Having said that,

Re: Psycopg3 fails to resolve 'timezone localtime' on MacOS

2022-05-05 Thread Jerry Sievers
> On May 5, 2022, at 8:43 PM, Daniele Varrazzo > wrote: > > On Fri, 6 May 2022 at 03:04, Jerry Sievers wrote: >> >> Has anyone run into This? >> >> Psycopg3 fails to resolve timezone localtime on MacOS (Catalina). > > That warning is typical on Windows, which doesn't have a system > timez

Re: Psycopg3 fails to resolve 'timezone localtime' on MacOS

2022-05-05 Thread Jerry Sievers
> On May 5, 2022, at 8:54 PM, Jerry Sievers wrote: > > > >> On May 5, 2022, at 8:43 PM, Daniele Varrazzo >> wrote: >> >> On Fri, 6 May 2022 at 03:04, Jerry Sievers wrote: >>> >>> Has anyone run into This? >>> >>> Psycopg3 fails to resolve timezone localtime on MacOS (Catalina). >> >> T

Order of rows in statement triggers NEW/OLD tables

2022-05-05 Thread hubert depesz lubaczewski
Hi, when defining statement triggers on update I can use: REFERENCING OLD TABLE AS xxx NEW TABLE as YYY these "pseudo" tables contain rows that were before and after. Is the order guaranteed? Can I assume that "first" row returned by select from xxx, will be older version of first row returned