Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 808E79FBDAC for ; Tue, 19 Jun 2007 20:42:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 50876-07 for ; Tue, 19 Jun 2007 20:42:06 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246]) by postgresql.org (Postfix) with ESMTP id 10CB79FB881 for ; Tue, 19 Jun 2007 20:42:10 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so447232ana for ; Tue, 19 Jun 2007 16:42:10 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XaQDHaY2zhIrDDWQOrgQCqdBiAWuay8X6JlOfbokQIT5q7Lxg2jXYWqN/9Q6BAZtiujGpbBCo5UQwKWikHCSsqYRwV66n4BjSSRaMnP9Ty+uq/DHikRed4lcUjmBB3G8mY6wTH+/Rlo7gCQ8gKSsItahVxOmMkcLoFc5lSQKQDI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZYDeUp7RrmDE7hw2oLKOyoXfHVo94zqZH8J+AynLyoSVdK/BLrWk3Y07wNRBVnvgUe4fluVJUqsrUPW5+tphHHkhviU28dmw7npX69LSC7lR6pE1Bzojs/9sAuggZYSVtMRRexjOAgcKNwAIZg0R5cbHlgfzse+FJVpXL/QwdFE= Received: by 10.100.96.9 with SMTP id t9mr995185anb.1182296530028; Tue, 19 Jun 2007 16:42:10 -0700 (PDT) Received: by 10.100.45.15 with HTTP; Tue, 19 Jun 2007 16:42:09 -0700 (PDT) Message-ID: Date: Tue, 19 Jun 2007 23:42:09 +0000 From: "Jaime Casanova" To: "Alvaro Herrera" Subject: Re: Ejecutar \copy desde VB Cc: "Chapilliquen Gutierrez Eduardo" , pgsql-es-ayuda@postgresql.org In-Reply-To: <20070619172559.GX4265@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <570797.97455.qm@web63713.mail.re1.yahoo.com> <52865C3823D7134E909B33D3822985942279D7@srvmail01.mem.int> <20070619154020.GO4265@alvh.no-ip.org> <52865C3823D7134E909B33D382298594227B80@srvmail01.mem.int> <20070619171050.GU4265@alvh.no-ip.org> <52865C3823D7134E909B33D382298594227C29@srvmail01.mem.int> <20070619172559.GX4265@alvh.no-ip.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/469 X-Sequence-Number: 28301 Ahora si, una vez reenviado el mensaje de Carlos Silva para que no parezca idea mia... On 6/19/07, Alvaro Herrera wrote: > Chapilliquen Gutierrez Eduardo escribi=F3: > > No, un no he hecho el programa con STDIN como me sugeriste, el tema es > > que no se como debo leer despu=E9s los datos para enviarlo a la tabla > lees el archivo linea a linea y en vez de enviar un COPY te armas una instruccion INSERT... claro que eso si puede ser lento... > Bueno, si no sabes programar en el lenguaje que estas utilizando, no es > en esta lista donde debes consultar. Lo unico que te puedo decir es que > en C lo harias con la rutina PQputCopyData, y terminas con PQputCopyEnd. > Esto se hace despues de haber enviado un COPY FROM STDIN. > en defensa de Chapiliquen dire que VB es un lenguaje facil de usar hasta que empiezas a hacer un programa real... entonces te das cuenta que VB no es lenguaje real... Ahora que si estas usando VB.Net deberias poder importar la libreria libpq.dll y usar las funciones que menciona Alvaro... --=20 Atentamente, Jaime Casanova "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook