Re: case insensitive collation of Greek's sigma

2021-11-30 Thread Frank Limpert
Am 26.11.21 um 08:37 schrieb Jakub Jedelsky: Hello, during our tests of Postgres with ICU we found an issue with ILIKE of upper and lowercase sigma (Σ). The letter has two lowercase variants σ and ς (at the end of a word). I'm working with en_US and en-US-x-icu collations and results are a bi

RE: Wildcarding json keys in json query

2021-11-30 Thread Patrick FICHE
I guess you could try something like this SELECT * FROM ( SELECT * from json_each(( '{ "ports" : { "port_abc":{"min": 5, "max": 7, "mean": 6}, "port_de

Re: ssl_crl_file Certificate Revocation List doesn't work for postgresql 11

2021-11-30 Thread Kyotaro Horiguchi
At Tue, 30 Nov 2021 21:53:06 +0800, Yi Sun wrote in > # cat /home/sunyi/tls/root.crt /home/sunyi/tls/1/root.crl > /tmp/test_1.pem > # openssl verify -extended_crl -verbose -CAfile /tmp/test_1.pem -crl_check > /home/sunyi/tls/1/server.crt I guess what you really wanted to revoke was not server.cr

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Peter Eisentraut
On 30.11.21 22:04, Tom Lane wrote: Daniel Gustafsson writes: On 30 Nov 2021, at 20:59, Tom Lane wrote: AFAICS this is the only test in our configure script that is a hard fail when cross-compiling, and I don't see a reason for it to be that. We could just assume that /dev/urandom will be avail

Re: [EXT] Re: XQuery/XPath 2.0+ support

2021-11-30 Thread Pavel Stehule
Hi st 1. 12. 2021 v 6:28 odesílatel Garfield Lewis napsal: > Thx, Tom... > > But isn't the libxml2 library not sufficient for this purpose? Note that I > have not tried it yet, I am still just investigating possible solutions. > Unfortunately, no, or it is not about Postgres. The development of

Re: [EXT] Re: XQuery/XPath 2.0+ support

2021-11-30 Thread Garfield Lewis
Thx, Tom... But isn't the libxml2 library not sufficient for this purpose? Note that I have not tried it yet, I am still just investigating possible solutions. -- Regards, Garfield A. Lewis On 2021-11-29, 12:08 PM, "Tom Lane" wrote: Garfield Lewis writes: > I am investigating wheth

Re: Database Scalability

2021-11-30 Thread Michael Stephenson
Store a connection string for each tenant or the metadata to build one on demand. Then each tenant is in its own schema on whatever database instance the connection string points at. Then it doesn’t really matter how you spread your tenants across one database or many; just do whatever works b

Re: Database Scalability

2021-11-30 Thread Mladen Gogala
On 11/30/21 22:08, Saurav Sarkar wrote: Hi Ben, Thanks a lot for your reply. So are all the schemas on one DB or are distributed/sharded across multiple DBs ? Best Regards, Saurav To my knowledge PostgreSQL doesn't support sharding, which is well and good because sharding is mostly useles

Re: Database Scalability

2021-11-30 Thread Saurav Sarkar
Hi Ben, Thanks a lot for your reply. So are all the schemas on one DB or are distributed/sharded across multiple DBs ? Best Regards, Saurav On Tue, Nov 30, 2021 at 11:43 PM Ben Chobot wrote: > Saurav Sarkar wrote on 11/29/21 10:13 PM: > > Hi All, > > We have some multi-tenant solutions which

Re: Wildcarding json keys in json query

2021-11-30 Thread David G. Johnston
On Tue, Nov 30, 2021 at 1:40 PM David Gauthier wrote: > { > ports : { > port_abc:{min: 5, max: 7, mean: 6}, > port_def:{min: 5, max: 9, mean: 7}, > port_ghi:{min: 6, max: 10, mean: 8} > } > } > > select 1 from mytbl where cast(test_results#>'{ports,***,mean}' as float) > >= 7 ; >

Re: ssl_crl_file Certificate Revocation List doesn't work for postgresql 11

2021-11-30 Thread Yi Sun
Hi Gabriel, Thank you. I copied root.crl again and reload postgresql -bash-4.2$ ls -alrt /var/lib/pgsql/tls total 24 -rw-r- 1 postgres postgres 1168 Nov 30 04:20 server.crt -rw--- 1 postgres postgres 1679 Nov 30 04:20 server.key -rw-r- 1 postgres postgres 688 Nov 30 04:20 root.crt -

Re: How to reveal the codes of functions properly?

2021-11-30 Thread David G. Johnston
On Tue, Nov 30, 2021 at 1:17 PM Shaozhong SHI wrote: > In what environment, that did not work. > >> >> In what environment did you wish the answer to be given? David J.

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Tom Lane
Daniel Gustafsson writes: > I noticed that we test without the x"foo" = x"yes" construction for zic (line > 1135), should we change that while at it and be consistent for all > $cross_compiling uses? Probably. $cross_compiling should theoretically always be set, but there's no harm in being bull

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Daniel Gustafsson
> On 30 Nov 2021, at 22:33, Tom Lane wrote: > > I wrote: >> It seems like a useful test when *not* cross compiling, which is most >> of the time. I'd just wrap that bit in >>if test "$cross_compiling" = no; then > > Or actually, since we should print something, it looks like this will do:

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Tom Lane
I wrote: > It seems like a useful test when *not* cross compiling, which is most > of the time. I'd just wrap that bit in > if test "$cross_compiling" = no; then Or actually, since we should print something, it looks like this will do: diff --git a/configure.ac b/configure.ac index a5c10b8d5

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Tom Lane
Daniel Gustafsson writes: >> On 30 Nov 2021, at 20:59, Tom Lane wrote: >> AFAICS this is the only test in our configure script that is a hard >> fail when cross-compiling, and I don't see a reason for it to be that. >> We could just assume that /dev/urandom will be available --- that's no >> wors

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Daniel Gustafsson
> On 30 Nov 2021, at 20:59, Tom Lane wrote: > > Vincas Dargis writes: >> checking which random number source to use... /dev/urandom >> checking for /dev/urandom... >> configure: error: cannot check for file existence when cross compiling > > Hmm ... this evidently stems from 16f96c74d. > > AF

Wildcarding json keys in json query

2021-11-30 Thread David Gauthier
PG 11.5 on linux Let's say I store a jsonb in a column called test_results that looks like this... { ports : { port_abc:{min: 5, max: 7, mean: 6}, port_def:{min: 5, max: 9, mean: 7}, port_ghi:{min: 6, max: 10, mean: 8} } } And I want to to get all the port names where the mean is

Re: How to reveal the codes of functions properly?

2021-11-30 Thread Wicher
On Tue, 30 Nov 2021 20:17:32 + Shaozhong SHI wrote: > In what environment, that did not work. > > > On Tuesday, 30 November 2021, Rob Sargent wrote: > > > On 11/30/21 9:30 AM, Shaozhong SHI wrote: > > > > Any one can shed the light on this? > > > > Regards, > > > > David > > > > \sf+ func

Re: How to reveal the codes of functions properly?

2021-11-30 Thread Rob Sargent
On 11/30/21 1:17 PM, Shaozhong SHI wrote: In what environment, that did not work. On Tuesday, 30 November 2021, Rob Sargent > wrote: On 11/30/21 9:30 AM, Shaozhong SHI wrote: Any one can shed the light on this? Regards, David \sf+ function

Re: How to reveal the codes of functions properly?

2021-11-30 Thread Shaozhong SHI
In what environment, that did not work. On Tuesday, 30 November 2021, Rob Sargent wrote: > On 11/30/21 9:30 AM, Shaozhong SHI wrote: > > Any one can shed the light on this? > > Regards, > > David > > \sf+ function_name >

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Tom Lane
Vincas Dargis writes: > checking which random number source to use... /dev/urandom > checking for /dev/urandom... > configure: error: cannot check for file existence when cross compiling Hmm ... this evidently stems from 16f96c74d. AFAICS this is the only test in our configure script that is a

Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Vincas Dargis
Hi list, I wanted to update [0] Conan package for building libpq 14.1. Usually it's enough to add new tarball and declare it's hash, but it seems that since 14.0 cross-compiling to armv8 MacOS now fails, and I *guess* it's due to removed `--disable-strong-random` option. Here's some snippets

Re: Database Scalability

2021-11-30 Thread Ben Chobot
Saurav Sarkar wrote on 11/29/21 10:13 PM: Hi All, We have some multi-tenant solutions which are separating the tenant data in Postgresql mainly in the following manner. 1. Using different schemas 2. Using different tables for different tenants. Without more details it's impossible to give y

Re: How to reveal the codes of functions properly?

2021-11-30 Thread Rob Sargent
On 11/30/21 9:30 AM, Shaozhong SHI wrote: Any one can shed the light on this? Regards, David \sf+ function_name

How to reveal the codes of functions properly?

2021-11-30 Thread Shaozhong SHI
Any one can shed the light on this? Regards, David

Re: ssl_crl_file Certificate Revocation List doesn't work for postgresql 11

2021-11-30 Thread Gabriel Cabillon
El 30/11/2021 a las 10:53, Yi Sun escribió: Hi All, OS: CentOS 7.6 PG: 11.11 Our env already configured ssl --server postgresql.conf ssl = 'on' ssl_ca_file = '/var/lib/pgsql/tls/root.c

ssl_crl_file Certificate Revocation List doesn't work for postgresql 11

2021-11-30 Thread Yi Sun
Hi All, OS: CentOS 7.6 PG: 11.11 Our env already configured ssl --server postgresql.conf ssl = 'on' ssl_ca_file = '/var/lib/pgsql/tls/root.crt' ssl_cert_file = '/var/lib/pgsql/tls/server.crt' ssl_key_file = '/var/lib/pgsql/tls/server.key' --client configuration $ ls -alrt /var/lib/pgsql/.postgre

Logical replication issue after Postgresql upgrade from 13 to 14

2021-11-30 Thread Sergey Belyashov
I have an issue with logical replication after Postgresql upgrade from 13 to 14 (upgraded subscriber only using pg_upgrade_cluster -m link 13 main). After upgrade all subscriptions were disabled so I have enabled them and replication workers successfully started. pg_stat_subscription contains list