pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Neil Chen <carpenter.nail.cz@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails
Date: Wed, 03 Mar 2021 08:41:49 +0000
Message-ID: <161476090989.29967.7097745522340560681.pgcf@coridan.postgresql.org> (raw)
In-Reply-To: <422379.1612684550@sss.pgh.pa.us>
References: <16583-4dc8f6c3b8ed24fa@postgresql.org>
	<422379.1612684550@sss.pgh.pa.us>

The following review has been posted through the commitfest application:
make installcheck-world:  tested, passed
Implements feature:       tested, passed
Spec compliant:           not tested
Documentation:            tested, passed

Greetings, 
I learned about the patch and read your discussions. I'm not sure why this patch has not been discussed now. In short, I think it's beneficial to submit it as a temporary solution.
Another thing I want to know is whether these codes can be simplified:
-	if (state > outer_cxt->state)
+	if (collation == outer_cxt->collation &&
+		((state == FDW_COLLATE_UNSAFE &&
+		  outer_cxt->state == FDW_COLLATE_SAFE) ||
+		 (state == FDW_COLLATE_SAFE &&
+		  outer_cxt->state == FDW_COLLATE_UNSAFE)))
+	{
+		outer_cxt->state = FDW_COLLATE_SAFE;
+	}
+	else if (state > outer_cxt->state)

If the state is determined by the collation, when the collations are equal, do we just need to judge the state not equal to FDW_COLLATE_NONE?

view thread (28+ messages)  latest in thread

Message-ID: <161476090989.29967.7097745522340560681.pgcf@coridan.postgresql.org>
Permalink:  ../161476090989.29967.7097745522340560681.pgcf@coridan.postgresql.org/
Also on:    postgresql.org/message-id/161476090989.29967.7097745522340560681.pgcf@coridan.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: carpenter.nail.cz@gmail.com, pgsql-hackers@lists.postgresql.org, tgl@sss.pgh.pa.us
  Subject: Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails
  In-Reply-To: <161476090989.29967.7097745522340560681.pgcf@coridan.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox