COPY LATIN1

From: Dan <danstreet(at)gmail(dot)com>
To: pgsql-es-ayuda <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: COPY LATIN1
Date: 2011-10-24 20:48:43
Message-ID: CAKw8BR_2cy9cAVPNET5LX8WZc2Qn-ZdXu1kuObnfPcDH_RbUYw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Buenas Tardes estoy utilizando creando una funcion plpgsql con la sentencia
COPY, pero al generar el archivo la tilde(*ó*) y la ñ (*ño*) salen mal

....

set client_encoding to 'latin1';

execute 'COPY (
select 'Dni', 'Nombre', 'Dirección', 'Año Reg.' from personal;
) TO ''/tmp/' || *p_file* || ''' WITH DELIMITER '','' NULL AS ''''
CSV HEADER';

...

*p_file* es un parametro que contiene el nombre del archivo csv.

Gracias por su ayuda.

--
-----------------
[) /-\ |\|

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alejandro Carrillo 2011-10-24 21:01:59 Re: COPY LATIN1
Previous Message Lazaro Rubén García Martinez 2011-10-24 20:29:40 RE: WAL LOG