Search Postgresql Archives

Re: postgres.app OS X psql character encoding (utf-8) problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 9, 2014, at 1:09 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:

> What this sounds like is that the readline or libedit library doesn't
> understand multibyte characters properly.  psql itself doesn't have
> anything to do with the display of un-entered lines, but relies on
> one of those libraries to manage input editing.
> 
> The default situation on OS X is generally that psql gets linked against
> the Apple-supplied libedit, which goes so far as to masquerade as
> readline.  Check "otool -L /path/to/psql"; if you see a reference to
> /usr/lib/libedit.3.dylib, or to /usr/lib/libreadline.dylib
> (which is really just a symlink to the former), then that's what you've
> got.  While I'm generally a fan and user of Apple stuff, their version
> of libedit is just abysmal; we've seen random crashes, complete failure
> of tab completion, and other bugs in successive OS X releases.  I also
> find specific references to multibyte input being busted in other
> distros' versions of libedit, eg
> http://www.postgresql.org/message-id/4D5B2C5A.8090506@xxxxxxxxxxxxxxx
> so it may not be all Apple's fault; but they definitely have a track
> record of shipping broken versions of libedit.

Thanks Tom Lane. It's useful to know that one of these handles unentered text.

postgres93.app is supplied with its own version of libedit.

user@hostname:~ $ otool -L `which psql`
/Applications/Postgres93.app/Contents/MacOS/bin/psql:
	/Applications/Postgres93.app/Contents/MacOS/lib/libpq.5.dylib (compatibility version 5.0.0, current version 5.6.0)
	/Applications/Postgres93.app/Contents/MacOS/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Applications/Postgres93.app/Contents/MacOS/lib/libedit.0.dylib (compatibility version 1.0.0, current version 1.45.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

Do you think this an indication that the app bundle may have been compiled with a bad version of libedit? I can file a bug report along those lines.

Thanks,
Chris

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux