octet_length operator: what encoding?

From: Chris Angelico <rosuav(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: octet_length operator: what encoding?
Date: 2012-03-30 00:37:54
Message-ID: CAPTjJmrve3q2Pc2Thhg7mFvQWCysHRcuoaKLL=uahZ8N-Kvoww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We have a number of varchar fields and I'm looking to see what the
greatest data length in any is, after UTF-8 encoding. The two-argument
length function appears (I think) to take a byte array, so it's the
opposite of what I'm looking for (give it a UTF-8 encoded string and
the second parameter 'UTF-8' and it'll count characters). The
octet_length function, though, doesn't accept an encoding argument.
What does it use?

ChrisA

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ken Tanzer 2012-03-30 00:57:37 Re: default value returned from sql stmt
Previous Message Toby Corkindale 2012-03-29 23:32:03 Re: How to tell if server is in backup mode?