Skip site navigation (1) Skip section navigation (2)

behaviour of LENGTH() in postgresql v. 8

From: "Marcus Andree S(dot) Magalhaes" <marcus(dot)magalhaes(at)vlinfo(dot)com(dot)br>
To: pgsql-novice(at)postgresql(dot)org
Subject: behaviour of LENGTH() in postgresql v. 8
Date: 2004-10-29 22:10:47
Message-ID: 53754.201.12.65.196.1099087847.squirrel@201.12.65.196 (view raw or flat)
Thread:
Lists: pgsql-novice
Dear all,

While checking the last Beta3-Beta4 Changelog of Postgres 8.0,
I saw the following:

	* doc/TODO: Remove completed items:
        <snip>
          * -Make LENGTH() of
	  CHAR() not count trailing spaces

If I understand correctly, this will lead to the following situation:

      CHAR_LENGTH('ABCD') == CHAR_LENGTH('ABCD    ') == 4

This will definitely break some of our applications.

Just want to be sure if this LENGTH() behaviour _will_ appear
on the next version of Postgres. If true, can we somehow revert
to the current LENGTH() behaviour?

Can someone, please, clarify this issue?

Thanks a lot.

Responses

pgsql-novice by date

Next:From: Bruce MomjianDate: 2004-10-29 22:17:03
Subject: Re: behaviour of LENGTH() in postgresql v. 8
Previous:From: Tom LaneDate: 2004-10-29 21:16:14
Subject: Re: [NOVICE] Postgresql crash- any ideas?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group