pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Edward Ross <efrossuhl@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Re: Pregunta acerca de la función COPY de POSTGRES
Date: Wed, 11 Apr 2012 13:43:20 -0700
Message-ID: <4F85ECE8.8030405@gmail.com> (raw)
In-Reply-To: <CA+6KN49khVD1Xw+NzMOm5ETBOUUhoyduCt+BLKkzYo5w_HA8ow@mail.gmail.com>
References: <CA+6KN4-bZyOsdHphHPLLsW43_q62LTB4dZnj0at+tAQC+O6_gg@mail.gmail.com>
	<CA+6KN49khVD1Xw+NzMOm5ETBOUUhoyduCt+BLKkzYo5w_HA8ow@mail.gmail.com>

Estas tratando de realizar esta operacion desde un stored procedure?  Si 
es asi, investiga como se hace para concatenar variables tipo 
character.  Creo que simplemente poner tu variable en un comando no es 
suficiente.

Saludos,

Edward Ross

On 04/11/2012 10:42 AM, yeison garcia wrote:
>
>     Buenas tardes.
>
>     Mi nombre es Yeison Garcia Escobar.
>
>     Estoy dando mis primeros pasos en postgres
>     y tengo la tarea de investigar las cargas masivas.
>
>     Estuve buscando y encontre la función
>     COPY FROM, la cual es excelente.
>
>     Al usar
>     copy _edb_scheduler.persona from  'C:/persona.txt' using
>     delimiters ',' ;
>     funciona correctamente.
>
>     Sin embargo, yo necesito que la ruta sea guardada en una variable.
>
>     Ejemplo:
>
>     Tengo la variable
>     ruta character;
>     ruta := 'C:/persona.txt';
>
>     al usar copy _edb_scheduler.persona from  ruta using delimiters ',' ;
>
>     me sale un error indicando un error de sintaxis indicando que la
>     variable ruta no debe estar ahí.
>
>     La pregunta es:
>     ¿Como puedo hacer para que la función COPY tome la información que
>     esta en una variable?
>
>     Muchas gracias por la ayuda que me puedan brindar.
>
>

view thread (2+ messages)

Message-ID: <4F85ECE8.8030405@gmail.com>
Permalink:  ../4F85ECE8.8030405@gmail.com/
Also on:    postgresql.org/message-id/4F85ECE8.8030405@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: efrossuhl@gmail.com
  Subject: Re: Re: Pregunta acerca de la función COPY de POSTGRES
  In-Reply-To: <4F85ECE8.8030405@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox