On 1/30/20, Markus Winand <markus.win...@winand.at> wrote: > > Unfortunately, the “what would PostgreSQL do” approach doesn’t provide > guidance here.
Maybe it does. PostgreSQL doesn't allow typeless columns, but it does allow columns with unspecified collating sequences, does it not? What if you have a normal column X with some collating sequence C and then a generated column Y that as just "AS(X)". If you do comparisons on column Y, which collating sequence does it use - the default or C? Can you run that experiment for us? Or maybe you are thinking the collating sequence of the expression in the AS clause should only be carried through into the generated column if it is explicitly stated, and not implied? What happens if there is a collating sequence specified in the AS clause and also another collating sequence on the column definitions? CREATE TABLE t1(x TEXT, y TEXT AS (x COLLATE nocase) COLLATE rtree); Which collating sequence should be used for "SELECT * FROM t1 WHERE y='xyz';"? Regarding WWPD: If you can convince Tom Lane and/or Bruce Momjian to send me an email that says "An explicit collating sequence at the top-level of a GENERATED ALWAYS AS clause should be carried through as the default collating sequence of the generated column itself", then I'll change it. :-) -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users