Re: Issue with PSQL JDBC Driver Null Pointer

2021-07-29 Thread Edson Carlos Ericksson Richter
I would do public String getTypeForAlias(String alias) { if (alias==null) return null; // this shall solve NPE on alias.toLowerCase() String type = TYPE_ALIASES.get(alias); if (type != null) { return type; } type = TYPE_ALIASES.get(alias.toLowerCa

Re: Issue with PSQL JDBC Driver Null Pointer

2021-07-29 Thread Bhavesh Mistry
Hi Dave, It still does not address the NPE issue. If an alias is NULL. What should be the behavior? public String getTypeForAlias(String alias) { String type = TYPE_ALIASES.get(alias); if (type != null) { return type; } type = TYPE_ALIASES.get(alias.toLowerCase()) *// NPE STILL HERE*; if (type

Re: Issue with PSQL JDBC Driver Null Pointer

2021-07-29 Thread Dave Cramer
On Thu, 29 Jul 2021 at 15:44, Bhavesh Mistry wrote: > Hi Dave, > > It still does not address the NPE issue. If an alias is NULL. What > should be the behavior? > > > public String getTypeForAlias(String alias) { > String type = TYPE_ALIASES.get(alias); > if (type != null) { > return type; > } >

Re: PostgreSQL reference coffee mug

2021-07-29 Thread Rory Campbell-Lange
On 29/07/21, Matthias Apitz (g...@unixarea.de) wrote: > El día miércoles, julio 28, 2021 a las 07:30:24p. m. +0200, Matthias Apitz > escribió: > Resulted, that the size can be 20.12cm X 7.5cm. Attached is an updated > version as PDF. Hints/bugs are welcome. I personally find that, after \l (list

Re: PostgreSQL reference coffee mug

2021-07-29 Thread Matthias Apitz
El día miércoles, julio 28, 2021 a las 07:30:24p. m. +0200, Matthias Apitz escribió: > I printed the PDF on paper, cut it to the size of 7.5cm x 16cm and > wrapped it around the mugs I have here. 16cm is not correct. My mugs have > more or less 7-8cm as diameter which gives around: > > $ bc -l >

Re: Issue with PSQL JDBC Driver Null Pointer

2021-07-29 Thread Dave Cramer
On Thu, 29 Jul 2021 at 11:04, Bhavesh Mistry wrote: > Hello, > > I am getting an NPE exception in the JDBC driver 42.2.23. > > When the alias is null, NPE results. Is it possible to handle null value > ? I have filled a bug against RCA > https://github.com/vladmihalcea/hibernate-types/issues/335

Re: Updating PK and all FKs to it in CTE

2021-07-29 Thread Tom Kazimiers
On Thu, Jul 29, 2021 at 10:51:09AM -0400, Tom Lane wrote: I tried to reproduce your problem and failed; the attached script acts as I'd expect. So there must be some moving part you've not mentioned. Can yo create a similar self-contained example that fails? Thanks very much for trying this.

Issue with PSQL JDBC Driver Null Pointer

2021-07-29 Thread Bhavesh Mistry
Hello, I am getting an NPE exception in the JDBC driver 42.2.23. When the alias is null, NPE results. Is it possible to handle null value ? I have filled a bug against RCA https://github.com/vladmihalcea/hibernate-types/issues/335. But, I thought that PSQL Driver can handle it more gracefully.

Re: Updating PK and all FKs to it in CTE

2021-07-29 Thread Tom Lane
Tom Kazimiers writes: > I am on Postgres 13 and have a problem with updates in a CTE. While certainly > not generally recommended, I need to update the primary key in a table that is > referenced by a few other tables. The table definition is attached to the end > of this email [2]. I'd like to av

Re: Low cache hit ratio

2021-07-29 Thread Philip Semanchuk
> On Jul 29, 2021, at 3:09 AM, Lucas wrote: > > Hello, > > I have recently deployed a new Slave (streaming replication) and have been > monitoring its cache hit ratio. > > At the moment, read-only queries are being sent to this slave but only 10% of > the traffic. > The cache hit ratio is

Updating PK and all FKs to it in CTE

2021-07-29 Thread Tom Kazimiers
Hi all, I am on Postgres 13 and have a problem with updates in a CTE. While certainly not generally recommended, I need to update the primary key in a table that is referenced by a few other tables. The table definition is attached to the end of this email [2]. I'd like to avoid dropping and recr

Low cache hit ratio

2021-07-29 Thread Lucas
Hello, I have recently deployed a new Slave (streaming replication) and have been monitoring its cache hit ratio. At the moment, read-only queries are being sent to this slave but only 10% of the traffic. The cache hit ratio is now at 82%. This database is around 1.4TB and is running on EC2 in