On Sun, 19 Sep 2004, Greg Stark wrote: > > Dennis Bjorklund <[EMAIL PROTECTED]> writes: > > > Still, we want the final solution to be what the sql standard specify. A > > function as the proposed is however useful until a standard sql solution > > is implemented. I've used a similar function for some projects and it have > > worked well for me also. > > I haven't read the standard in this area (and the sections I have read don't > lead me to think reading this section would be a trivial task), but from what > I've seen people describe here I think the standard behaviour will be nigh > useless anyway. From what I understand the standard has you declare a locale > per column. That would mean the entire column can only store strings from a > single locale.
AFAICT, it's one default collation per column, but you can specify a collation to use on sorts and groups and comparisons. I think example statement parts would be like: ORDER BY name COLLATE de_DE WHERE name COLLATE de_DE < 'Smith' WHERE name < 'Smith' COLLATE de_DE There are limitations, like I believe the following is an error WHERE name COLLATE de_DE < 'Smith' COLLATE en_US because both have different explicitly given collations. ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match