Hi, On Fri, Jan 21, 2022 at 09:23:34PM +0100, Pavel Stehule wrote: > > st 19. 1. 2022 v 9:01 odesÃlatel Julien Rouhaud <rjuju...@gmail.com> napsal: > > > > Also, the pg_dump handling emits a COLLATION option for session variables > > even > > for default collation, while it should only emit it if the collation is > > not the > > type's default collation. As a reference, for attributes the SQL used is: > > > > "CASE WHEN a.attcollation > > <> t.typcollation " > > "THEN a.attcollation ELSE > > 0 END AS attcollation,\n" > > > > Isn't it a different issue? I don't see filtering DEFAULT_COLLATION_OID in > pg_dump code. But this case protects against a redundant COLLATE clause, > and for consistency, this check should be done for variables too.
Yes, sorry my message was a bit ambiguous as for all native collatable types the "default" collation is the type's default collation, I thought that the code extract would make it clear enough. In any case your fix is exactly what I had in mind so it's perfect, thanks! > I am sending updated patches Thanks a lot! I will try to review them over the weekend.