Thread: Re: psql 7.3 encoding problems

Re: psql 7.3 encoding problems

From
Joseph Shraibman
Date:
Try using \e to set the client encoding.

Rasmus wrote:
> An example of the problem:
>
> 1. Create a table directly in psql:
>    create table tmp(a int);
>
> 2. Write this directly into psql:
>    CREATE VIEW tmpview AS SELECT T.a FROM tmp T WHERE T.a > 100;
>
>    Notice that this works fine.
>
> 3. Make a ISO-8859 text file and paste exactly the same text into it:
>    CREATE VIEW tmpview AS SELECT T.a FROM tmp T WHERE T.a > 100;
>
> 4. Do:
>    \i <the file>
>
>    Notice that psql now gives an error:
> psql:/tmp/tmp.sql:1: ERROR:  parser: parse error at or near "t"
>
> Damn! :-(