[postgis-users] change the encoding for existing table

Sandro Santilli strk at keybit.net
Wed Apr 4 06:12:26 PDT 2012


On Wed, Apr 04, 2012 at 01:10:28PM +0100, Robert Buckley wrote:

> the encoding, I would like to change it to latin1.
> 
> How can I do this in postgresql on a postgis table?

Just set the client encoding, PostgreSQL will take care
of converting the data for you:

SET client_encoding TO 'Latin1';
SELECT weirdchars FROM mytable;

--strk;

  ,------o-. 
  |   __/  |    Delivering high quality PostGIS 2.0 !
  |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
  `-o------'




More information about the postgis-users mailing list