Re: cast to domain with default collation issue.

2022-05-24 Thread David G. Johnston
Please don’t top-post. On Tuesday, May 24, 2022, jian he wrote: > > Otherwise, all input expressions must have the same implicit collation >> derivation or the default collation. If any non-default collation is >> present, that is the result of the collation combination. Otherwise, the >> result

Re: cast to domain with default collation issue.

2022-05-24 Thread jian he
Otherwise, all input expressions must have the same implicit collation > derivation or the default collation. If any non-default collation is > present, that is the result of the collation combination. Otherwise, the > result is the default collation. > I think the above quote part can be used to

Re: Pg14 possible index corruption after reindex concurrently

2022-05-24 Thread Aleš Zelený
Thanks for the bug link, I haven't found it. Ales út 24. 5. 2022 v 21:58 odesílatel Thomas Munro napsal: > On Wed, May 25, 2022 at 6:17 AM Aleš Zelený wrote: > > SELECT format('REINDEX SCHEMA CONCURRENTLY %I;', n.nspname) > > This may be related to bug #17485, discussed at: > > > https://www.p

Re: Pg14 possible index corruption after reindex concurrently

2022-05-24 Thread Thomas Munro
On Wed, May 25, 2022 at 6:17 AM Aleš Zelený wrote: > SELECT format('REINDEX SCHEMA CONCURRENTLY %I;', n.nspname) This may be related to bug #17485, discussed at: https://www.postgresql.org/message-id/flat/17485-396609c6925b982d%40postgresql.org

Pg14 possible index corruption after reindex concurrently

2022-05-24 Thread Aleš Zelený
Hello, we have a problem with an index on a database we recently upgraded from PG13 to Pg14.3 using pg_upgrade. After all the upgrade steps including analyze in stages, we run "vacuumdb -Fvaz -j 8" and the user workload was started afterward. In order to get one of the Pg14 benefits (b-tree dedup

Re: About psql \dt unable display same name table which have different schema

2022-05-24 Thread 徐志宇徐
Hi Tom. Thanks for your explanation. I got it. I really appreciate it. Jack Xu. Tom Lane 于2022年5月25日周三 00:16写道: > =?UTF-8?B?5b6Q5b+X5a6H5b6Q?= writes: > > I don't know why this problem exist. Why unable display both table " > > public.test10 、 new. test10 " > > That's behaving as designe

Re: About psql \dt unable display same name table which have different schema

2022-05-24 Thread Tom Lane
=?UTF-8?B?5b6Q5b+X5a6H5b6Q?= writes: > I don't know why this problem exist. Why unable display both table " > public.test10 、 new. test10 " That's behaving as designed: \dt will show you tables that are accessible with an unqualified name, but new.test10 is hidden behind public.test10, so it's no

Re: existing row not found by SELECT ... WHERE CTID = ?

2022-05-24 Thread Tom Lane
Laurenz Albe writes: > It may well be that somebody deleted or updated a few rows between the time > the cursor was materialized and the time the 5th row was fetched. Even without HOLD, a cursor will return a view of the data as it stood when the cursor was opened, just as a plain SELECT does

About psql \dt unable display same name table which have different schema

2022-05-24 Thread 徐志宇徐
Hello All I experience a problem. The psql \dt command unable display same name table which have different schema. The table new. test10 unable display. Owing to the public.test10 exist. The pg_type_is_visible display "F" I don't know why this problem exist. Why unable display bot

Re: existing row not found by SELECT ... WHERE CTID = ?

2022-05-24 Thread Laurenz Albe
On Tue, 2022-05-24 at 16:44 +0200, Matthias Apitz wrote: > We have a C-written program, written in ESQL/C, of our LMS where the logic > crawls with FETCH through a hit list and does UPDATE on some rows which > match certain condition. This works fine for thousands of rows every night, > but magical

Re: existing row not found by SELECT ... WHERE CTID = ?

2022-05-24 Thread Matthias Apitz
El día martes, mayo 24, 2022 a las 10:47:11 -0400, Tom Lane escribió: > Matthias Apitz writes: > > We have a C-written program, written in ESQL/C, of our LMS where the logic > > crawls with FETCH through a hit list and does UPDATE on some rows which > > match certain condition. This works fine fo

Re: Can I start Update row in After Insert trigger function?

2022-05-24 Thread Adrian Klaver
On 5/23/22 23:17, Durumdara wrote: Dear Adrian! Thank you for the information. For me the main question is that: Can I execute an UPDATE in the  AFTER INSERT trigger procedure? Or is this confuses PGSQL, because prior operation (INSERT) isn't fully finished? It is spelled out here: https://w

Re: existing row not found by SELECT ... WHERE CTID = ?

2022-05-24 Thread Tom Lane
Matthias Apitz writes: > We have a C-written program, written in ESQL/C, of our LMS where the logic > crawls with FETCH through a hit list and does UPDATE on some rows which > match certain condition. This works fine for thousands of rows every night, > but magically sometimes it fails. Maybe som

existing row not found by SELECT ... WHERE CTID = ?

2022-05-24 Thread Matthias Apitz
We have a C-written program, written in ESQL/C, of our LMS where the logic crawls with FETCH through a hit list and does UPDATE on some rows which match certain condition. This works fine for thousands of rows every night, but magically sometimes it fails. I have here the part of ESQL/C logs when

Re: cast to domain with default collation issue.

2022-05-24 Thread Tom Lane
I wrote: > Perhaps this should be documented more clearly, but it's not obviously > wrong. If the domain declaration doesn't include an explicit COLLATE > then casting to the domain doesn't create an explicit collation > requirement. (That is, the domain *doesn't* have a specific > collation atta

Would it be possible to utilize a GIN index to query for distinct values ?

2022-05-24 Thread Danny Shemesh
Hey everyone ! Bumping an older thread , I've read the GIN readme in the code base and have skimmed through the implementation, it made me wonder - would it be possible to use the ind