Re: OCTET_LENGTH is wrong

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: peter_e(at)gmx(dot)net, barry(at)xythos(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: OCTET_LENGTH is wrong
Date: 2001-11-24 00:33:17
Message-ID: 20011124093317W.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > Yes. Consider you have UNICODE database and want to sort by French or
> > whatever LATIN locale.
> > SELECT * FROM t1 ORDER BY convert(text_column,'LATIN1');
> > would be the only way to accomplish that.
>
> That in itself would not get the job done; how is the sort operator
> to know what collation order you want?

I assume the locale support enabled of course.

> The SQL92 spec suggests that the syntax should be
>
> ... ORDER BY text_column COLLATE French;
>
> (note collation names are not standardized AFAICT). Seems to me it
> should then be the system's responsibility to make this happen,
> including any encoding conversion that might be needed before the
> comparisons could be done.

I'm not talking about our (hopefully) upcoming implementation of SQL92
COLLATE syntax. It's ideal and should be our goal, but what I have
shown is how we could do the job in 7.2 now.
--
Tatsuo Ishii

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Lamar Owen 2001-11-24 00:33:44 Re: RPMs and regression tests (was Re: v7.2b3 packaged...)
Previous Message Tatsuo Ishii 2001-11-24 00:32:22 Re: OCTET_LENGTH is wrong