From ECHAPILLIQUEN@minem.gob.pe Mon Jun 18 17:02:20 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 8B1AC9FB8CD for ; Mon, 18 Jun 2007 14:02:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 46473-08 for ; Mon, 18 Jun 2007 14:02:15 -0300 (ADT) X-Greylist: delayed 00:30:01.423945 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id C82379FB759 for ; Mon, 18 Jun 2007 14:02:16 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from srvmail01.mem.int (correo.minem.gob.pe [200.37.156.5]) by svr4.postgresql.org (Postfix) with SMTP id 8345C5AF028 for ; Mon, 18 Jun 2007 16:32:14 +0000 (GMT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7B1C6.0824C8B1" X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: Ejecutar \copy desde VB Date: Mon, 18 Jun 2007 11:30:50 -0500 Message-ID: <52865C3823D7134E909B33D3822985942028A3@srvmail01.mem.int> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Ejecutar \copy desde VB Thread-Index: Acexxghg1Ue0f1XOSG6fD2opgsIisA== From: "Chapilliquen Gutierrez Eduardo" To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.136 tagged_above=0 required=5 tests=BAYES_80=2, FORGED_RCVD_HELO=0.135, HTML_MESSAGE=0.001 X-Spam-Level: ** X-Archive-Number: 200706/404 X-Sequence-Number: 28236 This is a multi-part message in MIME format. ------_=_NextPart_001_01C7B1C6.0824C8B1 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Alguien podr=EDa indicarme como puedo ejecutar el comando pgsql "\copy" = desde una aplicaci=F3n VB, tengo una conexi=F3n v=EDa ODBC, el servidor = es 8.2 y esta instalado en un Windows XP-SP2. He logrado ejecutar el comando COPY, pero para ello necesito loguearme = con el s=FAper usuario de la BD, cosa que no ser=E1 el usuario que se = utilizara para la aplicaci=F3n, agradezco sus sugerencias =20 Saludos Eduardo Chapilliqu=E9n =20 ------_=_NextPart_001_01C7B1C6.0824C8B1 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Alguien podr=EDa=20 indicarme como puedo ejecutar el comando pgsql  "\copy" desde = una=20 aplicaci=F3n VB, tengo una conexi=F3n v=EDa ODBC, el servidor es 8.2 y = esta instalado=20 en un Windows XP-SP2.
He = logrado ejecutar=20 el comando COPY, pero para ello necesito loguearme con el s=FAper = usuario de la=20 BD, cosa que no ser=E1 el usuario que se utilizara para la aplicaci=F3n, = agradezco=20 sus sugerencias
 
Saludos

Eduardo=20 Chapilliqu=E9n

 
------_=_NextPart_001_01C7B1C6.0824C8B1-- From alvherre@commandprompt.com Mon Jun 18 17:31:34 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 3195F9FB28C for ; Mon, 18 Jun 2007 14:31:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 50189-03 for ; Mon, 18 Jun 2007 14:31:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 74E5F9FBB6E for ; Mon, 18 Jun 2007 14:31:22 -0300 (ADT) Received: from perhan.alvh.no-ip.org (190-13-143-52.bk13-dsl.surnet.cl [190.13.143.52]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l5IHUvOZ017618; Mon, 18 Jun 2007 10:31:05 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 130A432A23; Mon, 18 Jun 2007 13:30:54 -0400 (CLT) Date: Mon, 18 Jun 2007 13:30:54 -0400 From: Alvaro Herrera To: Chapilliquen Gutierrez Eduardo Cc: pgsql-es-ayuda@postgresql.org Subject: Re: Ejecutar \copy desde VB Message-ID: <20070618173053.GE13688@alvh.no-ip.org> References: <52865C3823D7134E909B33D3822985942028A3@srvmail01.mem.int> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52865C3823D7134E909B33D3822985942028A3@srvmail01.mem.int> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Mon, 18 Jun 2007 10:31:06 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/406 X-Sequence-Number: 28238 Chapilliquen Gutierrez Eduardo escribió: > Alguien podría indicarme como puedo ejecutar el comando pgsql "\copy" > desde una aplicación VB, tengo una conexión vía ODBC, el servidor es > 8.2 y esta instalado en un Windows XP-SP2. He logrado ejecutar el > comando COPY, pero para ello necesito loguearme con el súper usuario > de la BD, cosa que no será el usuario que se utilizara para la > aplicación, agradezco sus sugerencias En realidad puedes usar COPY sin un superusuario, pero tienes que usar COPY FROM STDIN en lugar de tratar de pasarle un archivo. No puedes usar \copy, puesto que esa órden es sólo de psql (el programa de consola), no es parte de la API de Postgres, ni de SQL, etc. Supongo que una solución sería que tu aplicación en VB ejecute algo como psql -c "\copy ..." -- Alvaro Herrera http://www.amazon.com/gp/registry/DXLWNGRJD34J "Los dioses no protegen a los insensatos. Éstos reciben protección de otros insensatos mejor dotados" (Luis Wu, Mundo Anillo) From ECHAPILLIQUEN@minem.gob.pe Mon Jun 18 18:03:50 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D21859FC06D for ; Mon, 18 Jun 2007 15:03:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 57193-01-7 for ; Mon, 18 Jun 2007 15:03:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from srvmail01.mem.int (correo.minem.gob.pe [200.37.156.5]) by postgresql.org (Postfix) with SMTP id CC5009FBC64 for ; Mon, 18 Jun 2007 15:01:57 -0300 (ADT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: RE: Ejecutar \copy desde VB Date: Mon, 18 Jun 2007 13:00:28 -0500 Message-ID: <52865C3823D7134E909B33D382298594202A4C@srvmail01.mem.int> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [pgsql-es-ayuda] Ejecutar \copy desde VB Thread-Index: Acexzk+5jnWUpQvQSP2wOP1Py6DgnAAA6RzA References: <52865C3823D7134E909B33D3822985942028A3@srvmail01.mem.int> <20070618173053.GE13688@alvh.no-ip.org> From: "Chapilliquen Gutierrez Eduardo" To: "Alvaro Herrera" Cc: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.886 tagged_above=0 required=5 tests=AWL=0.750, BAYES_50=0.001, FORGED_RCVD_HELO=0.135 X-Spam-Level: X-Archive-Number: 200706/407 X-Sequence-Number: 28239 Lo que pasa es que deseo cargar un archivo de texto a una tabla, lo he = realizado de esta forma copy prueba from 'c:/eduardo/RT12292006110801'; Y funciona muy bien, pero leyendo la documentaci=F3n entend=ED que COPY = solo funciona con el s=FAper usuario, Pero como puedo cargar mi archivo con COPY FROM STDIN?? Eduardo=20 -----Mensaje original----- De: Alvaro Herrera [mailto:alvherre@commandprompt.com]=20 Enviado el: Monday, June 18, 2007 12:31 PM Para: Chapilliquen Gutierrez Eduardo CC: pgsql-es-ayuda@postgresql.org Asunto: Re: [pgsql-es-ayuda] Ejecutar \copy desde VB Chapilliquen Gutierrez Eduardo escribi=F3: > Alguien podr=EDa indicarme como puedo ejecutar el comando pgsql = "\copy" > desde una aplicaci=F3n VB, tengo una conexi=F3n v=EDa ODBC, el = servidor es > 8.2 y esta instalado en un Windows XP-SP2. He logrado ejecutar el=20 > comando COPY, pero para ello necesito loguearme con el s=FAper usuario = > de la BD, cosa que no ser=E1 el usuario que se utilizara para la=20 > aplicaci=F3n, agradezco sus sugerencias En realidad puedes usar COPY sin un superusuario, pero tienes que usar = COPY FROM STDIN en lugar de tratar de pasarle un archivo. No puedes usar \copy, puesto que esa =F3rden es s=F3lo de psql (el = programa de consola), no es parte de la API de Postgres, ni de SQL, etc. = Supongo que una soluci=F3n ser=EDa que tu aplicaci=F3n en VB ejecute = algo como psql -c "\copy ..." --=20 Alvaro Herrera = http://www.amazon.com/gp/registry/DXLWNGRJD34J "Los dioses no protegen a los insensatos. =C9stos reciben protecci=F3n = de otros insensatos mejor dotados" (Luis Wu, Mundo Anillo) From systemguards@gmail.com Tue Jun 19 02:09:54 2007 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 0EB609FBC79 for ; Mon, 18 Jun 2007 23:09:54 -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 15427-01-2 for ; Mon, 18 Jun 2007 23:09:42 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.242]) by postgresql.org (Postfix) with ESMTP id 23AF29FBB92 for ; Mon, 18 Jun 2007 23:09:47 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so374626ana for ; Mon, 18 Jun 2007 19:09:46 -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=TWsAYBcDCcW4Xl8Qdn2KGZSGxWM9ypFjp6H0i+LP549nMxiWHoGyuT+Uamqb/wzkQ4PypFFSS7Rrq8d84B9BNk2/7Bsd/RoRGv2axwXEbLpgNbwKtSZao8hnJ9BFolgHanMTLKEY8Ln+cgjGUHpB0S0yJoCUFNpYAg2gCTh6+xE= 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=IxBuaZDnRtE8mYS9wY2lwc8vXWm2HcCrCWSC9VeahVmEvrcSoRttQ9NFjLMM9E43Gu4xmBb56VHcUBSEux27QX5+94ctdQ+JQBDJjSsbMZbUDz2f4mRmji/FFWWocNfgxFJZVdXsrkHEXxyBjF2Sr1ggHeH7bjUy4SU69bxZ5P4= Received: by 10.100.46.19 with SMTP id t19mr3954166ant.1182218986650; Mon, 18 Jun 2007 19:09:46 -0700 (PDT) Received: by 10.100.45.15 with HTTP; Mon, 18 Jun 2007 19:09:46 -0700 (PDT) Message-ID: Date: Tue, 19 Jun 2007 02:09:46 +0000 From: "Jaime Casanova" To: "Chapilliquen Gutierrez Eduardo" Subject: Re: Ejecutar \copy desde VB Cc: "Alvaro Herrera" , pgsql-es-ayuda@postgresql.org In-Reply-To: <52865C3823D7134E909B33D382298594202A4C@srvmail01.mem.int> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <52865C3823D7134E909B33D3822985942028A3@srvmail01.mem.int> <20070618173053.GE13688@alvh.no-ip.org> <52865C3823D7134E909B33D382298594202A4C@srvmail01.mem.int> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/413 X-Sequence-Number: 28245 On 6/18/07, Chapilliquen Gutierrez Eduardo wrote: > Pero como puedo cargar mi archivo con COPY FROM STDIN?? > ejecutas el comando "COPY tutabla FROM stdin;" con conexion.execute y luego empiezas a enviar datos a traves de STDIN, este articulo muestra como hacerlo http://support.microsoft.com/kb/239588 Bueno... te da una idea, para que puedas seguir adelante ;) -- 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 From hermeszambra@yahoo.com Tue Jun 19 02:41:32 2007 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 0768D9FB55F for ; Mon, 18 Jun 2007 23:41:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 16691-04 for ; Mon, 18 Jun 2007 23:41:24 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from web63713.mail.re1.yahoo.com (web63713.mail.re1.yahoo.com [69.147.97.98]) by postgresql.org (Postfix) with SMTP id 2BF0F9FB55A for ; Mon, 18 Jun 2007 23:41:25 -0300 (ADT) Received: (qmail 98824 invoked by uid 60001); 19 Jun 2007 02:41:23 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=h26A/5XRN8ScAGAv40yX155qyVV0G2Y0VtQFYYprTsZ9T2T51Y3SPgPa9LvIj1rfy0KjRgYvkS2m2ZkYba6fihG6GLfa+s828OJDpAY/BAkF+QWejFZM5rwfliTw/MY0psCFZFCjHAuTq4gtp2p50yO6PZCrPT/NC7O80rwPUYI=; X-YMail-OSG: ND6ppMMVM1kP85qnZF1BNRXjjeKddJjJOlUGRpV_oW3T0KawLgQ81QZPZ.ea9lYvW6oeL9CeB.QrtbtrdN4UiSLd2QdFcrFRWwjv92qgFmT22bRLSlAI6C2X25qmE3E- Received: from [190.64.227.159] by web63713.mail.re1.yahoo.com via HTTP; Mon, 18 Jun 2007 21:41:23 CDT Date: Mon, 18 Jun 2007 21:41:23 -0500 (CDT) From: Gabriel Hermes Colina Zambra Subject: Re: Ejecutar \copy desde VB To: Jaime Casanova , Chapilliquen Gutierrez Eduardo Cc: Alvaro Herrera , pgsql-es-ayuda@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <570797.97455.qm@web63713.mail.re1.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.098 tagged_above=0 required=5 tests=AWL=-0.258, BAYES_50=0.001, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, DNS_FROM_RFC_WHOIS=1.447 X-Spam-Level: *** X-Archive-Number: 200706/414 X-Sequence-Number: 28246 --- Jaime Casanova escribió: > On 6/18/07, Chapilliquen Gutierrez Eduardo > wrote: > > Pero como puedo cargar mi archivo con COPY FROM > STDIN?? > > > > ejecutas el comando "COPY tutabla FROM stdin;" con > conexion.execute > > y luego empiezas a enviar datos a traves de STDIN, > este articulo > muestra como hacerlo > http://support.microsoft.com/kb/239588 > > Bueno... te da una idea, para que puedas seguir > adelante ;) > > -- > 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 > -- > ---------------------------(fin del > mensaje)--------------------------- > TIP 5: ¿Has leído nuestro extenso FAQ? > > http://www.postgresql.org/files/documentation/faqs/FAQ.html > Otra burda manera pero menos complicada, es crear un .bat que maneje set pgpassword=clavedeusuariopostgres y ejecutar el bat con la instruccion shell desde visual basic, quiza teniendo un lnk apuntando al bat. Es una idea burda pero funciona. Atte. Gabriel Hermes Colina Zambra __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.espanol.yahoo.com/ From systemguards@gmail.com Tue Jun 19 03:30:31 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id C80D89FB72F for ; Tue, 19 Jun 2007 00:30:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 03605-06 for ; Tue, 19 Jun 2007 00:30:27 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ag-out-0708.google.com (ag-out-0708.google.com [72.14.246.240]) by postgresql.org (Postfix) with ESMTP id C909F9FB64D for ; Tue, 19 Jun 2007 00:30:27 -0300 (ADT) Received: by ag-out-0708.google.com with SMTP id 23so1296854agd for ; Mon, 18 Jun 2007 20:30:26 -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=mjYkz0oss6b8eahmAZ0M+0P5Ee5Dlb83IW/075n7bs1smm7o0tlzEaAVVq6GoUNlgjn7o7D8/WMS99SMrVMka6vzwGNLR693DkBrGUJ/NCKG17RkscVQ+SSYooRzH4rLVBo2e36bq9EbuWNd2BEL+/MNrFfWPz1/VrslyEYHbSc= 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=kQMWw/dm5JMupBMkRMwxaGQZ2+024gkbCh77NmC39YasArtXds3mrU40UfXiTFI1/Aw7+NLGDGg6kdcnnNKWQvjkNthcPrrzmj3GBXHacapYqOno+t8dG5PNZOB8Tako8UlMKID/BansrfRhUjU5Zvt2Xhg1isRb5A7Ol2eIjAc= Received: by 10.100.177.16 with SMTP id z16mr3987395ane.1182223826928; Mon, 18 Jun 2007 20:30:26 -0700 (PDT) Received: by 10.100.45.15 with HTTP; Mon, 18 Jun 2007 20:30:26 -0700 (PDT) Message-ID: Date: Tue, 19 Jun 2007 03:30:26 +0000 From: "Jaime Casanova" To: "Gabriel Hermes Colina Zambra" Subject: Re: Ejecutar \copy desde VB Cc: "Chapilliquen Gutierrez Eduardo" , "Alvaro Herrera" , pgsql-es-ayuda@postgresql.org In-Reply-To: <570797.97455.qm@web63713.mail.re1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <570797.97455.qm@web63713.mail.re1.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/415 X-Sequence-Number: 28247 On 6/19/07, Gabriel Hermes Colina Zambra wrote: > > > Otra burda manera pero menos complicada, es crear un > .bat que maneje set pgpassword=clavedeusuariopostgres en vez de setear pgpassword deberias usar un archivo pgpass.conf http://www.postgresql.org/docs/8.2/static/libpq-pgpass.html > y ejecutar el bat con la instruccion shell desde > visual basic, quiza teniendo un lnk apuntando al bat. > Es una idea burda pero funciona. > pero creo, no estoy seguro porque Chapiliquen no lo dejo claro, que quiere hacer eso desde un cliente y no desde el servidor... y dudo mucho que quiera tener recursos compartidos en cada cliente solo para eso... ahora que si esta dispuesto esa seria una solucion (claro que, segun yo, necesitaria ejecutar el bat en el servidor) -- 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 From ECHAPILLIQUEN@minem.gob.pe Tue Jun 19 15:26:17 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id EE86C9FA589 for ; Tue, 19 Jun 2007 12:26:17 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 92139-02-6 for ; Tue, 19 Jun 2007 12:25:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from srvmail01.mem.int (correo.minem.gob.pe [200.37.156.5]) by postgresql.org (Postfix) with SMTP id C6B4A9FBE31 for ; Tue, 19 Jun 2007 12:25:55 -0300 (ADT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: RE: Ejecutar \copy desde VB Date: Tue, 19 Jun 2007 10:24:39 -0500 Message-ID: <52865C3823D7134E909B33D3822985942279D7@srvmail01.mem.int> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [pgsql-es-ayuda] Ejecutar \copy desde VB Thread-Index: AceyIit5ZdIpsqH1TFqN4UcUJfq1RgAYdLTA References: <570797.97455.qm@web63713.mail.re1.yahoo.com> From: "Chapilliquen Gutierrez Eduardo" To: "Jaime Casanova" , "Gabriel Hermes Colina Zambra" Cc: "Alvaro Herrera" , X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.436 tagged_above=0 required=5 tests=AWL=0.300, BAYES_50=0.001, FORGED_RCVD_HELO=0.135 X-Spam-Level: X-Archive-Number: 200706/423 X-Sequence-Number: 28255 Lo que quiero hacer es carga un archivo a una tabla de postgres, el = archivo lo tengo en una estaci=F3n cliente con Windows XP, el servidor = donde estar=E1 la Vd. puede estar en Windows o Linux, aun no se donde lo = tendr=E1 instalado el cliente. En mi ambiente de desarrollo lo que he realizado es una aplicaci=F3n en = VB NET que me carga el archivo usando el comando COPY: OdbcCommand.CommandText =3D "copy tmp_carga_in from 'C:/eduardo/" & = txtArchivo.Text & "';" OdbcCommand.CommandType =3D CommandType.Text OdbcCommand.Connection =3D CN OdbcCommand.ExecuteNonQuery() Por lo que he le=EDdo y de las respuestas que me has brindado esto = funciona porque tengo el postgre instalado localmente donde estoy = desarrollando la aplicaci=F3n, pero cuando lo instale donde el cliente = esto no ser=E1 as=ED, la Vd. estar=E1 en un servidor y la aplicaci=F3n = cliente en la PC del usuario. Lo =FAnico que se me ocurre es copiar el archivo en el servidor y luego = ejecutar el copy d=E1ndole la ruta del archivo ya en el servidor, me = podr=EDan decir si con eso funcionaria sin problemas la carga del = archivo?? Saludos Eduardo -----Mensaje original----- De: Jaime Casanova [mailto:systemguards@gmail.com]=20 Enviado el: Monday, June 18, 2007 10:30 PM Para: Gabriel Hermes Colina Zambra CC: Chapilliquen Gutierrez Eduardo; Alvaro Herrera; = pgsql-es-ayuda@postgresql.org Asunto: Re: [pgsql-es-ayuda] Ejecutar \copy desde VB On 6/19/07, Gabriel Hermes Colina Zambra wrote: > > > Otra burda manera pero menos complicada, es crear un .bat que maneje=20 > set pgpassword=3Dclavedeusuariopostgres en vez de setear pgpassword deberias usar un archivo pgpass.conf = http://www.postgresql.org/docs/8.2/static/libpq-pgpass.html > y ejecutar el bat con la instruccion shell desde visual basic, quiza=20 > teniendo un lnk apuntando al bat. > Es una idea burda pero funciona. > pero creo, no estoy seguro porque Chapiliquen no lo dejo claro, que = quiere hacer eso desde un cliente y no desde el servidor... y dudo mucho = que quiera tener recursos compartidos en cada cliente solo para eso... = ahora que si esta dispuesto esa seria una solucion (claro que, segun yo, = necesitaria ejecutar el bat en el servidor) -- 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 From alvherre@commandprompt.com Tue Jun 19 15:41:00 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 29FFF9FB987 for ; Tue, 19 Jun 2007 12:41:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 90896-07 for ; Tue, 19 Jun 2007 12:40:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 0E0739FBDB5 for ; Tue, 19 Jun 2007 12:40:55 -0300 (ADT) Received: from perhan.alvh.no-ip.org (190-13-143-52.bk13-dsl.surnet.cl [190.13.143.52]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l5JFeNP4028335; Tue, 19 Jun 2007 08:40:24 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id B45C832A23; Tue, 19 Jun 2007 11:40:20 -0400 (CLT) Date: Tue, 19 Jun 2007 11:40:20 -0400 From: Alvaro Herrera To: Chapilliquen Gutierrez Eduardo Cc: Jaime Casanova , Gabriel Hermes Colina Zambra , pgsql-es-ayuda@postgresql.org Subject: Re: Ejecutar \copy desde VB Message-ID: <20070619154020.GO4265@alvh.no-ip.org> References: <570797.97455.qm@web63713.mail.re1.yahoo.com> <52865C3823D7134E909B33D3822985942279D7@srvmail01.mem.int> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52865C3823D7134E909B33D3822985942279D7@srvmail01.mem.int> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Tue, 19 Jun 2007 08:40:24 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.346 tagged_above=0 required=5 tests=AWL=-1.348, BAYES_50=0.001, FORGED_RCVD_HELO=0.135, RCVD_IN_BL_SPAMCOP_NET=1.558 X-Spam-Level: X-Archive-Number: 200706/425 X-Sequence-Number: 28257 Chapilliquen Gutierrez Eduardo escribió: > Por lo que he leído y de las respuestas que me has brindado esto > funciona porque tengo el postgre instalado localmente donde estoy > desarrollando la aplicación, pero cuando lo instale donde el cliente > esto no será así, la Vd. estará en un servidor y la aplicación cliente > en la PC del usuario. Correcto. > Lo único que se me ocurre es copiar el archivo en el servidor y luego > ejecutar el copy dándole la ruta del archivo ya en el servidor, me > podrían decir si con eso funcionaria sin problemas la carga del > archivo?? La otra alternativa es que la aplicacion abra el archivo y lo lea linea a linea, y le pase cada linea a un COPY FROM STDIN. Yo creo que eso es mas "programable" que copiar el archivo al servidor. Estar moviendo archivos de un lado a otro, en mi experiencia, es complicado programaticamente (tienes que tener abierto un FTP, o un SSH, y que funcione bien el asunto de darle las passwords, abrir los ports en el firewall, etc). En resumen, un lio no solo para el programador sino tambien para los administradores de red, etc. En cambio lo otro es solamente cosa de escribir unas cuantas lineas de codigo. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. From ECHAPILLIQUEN@minem.gob.pe Tue Jun 19 16:51:14 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 084629FB6C0 for ; Tue, 19 Jun 2007 13:51:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 98309-09 for ; Tue, 19 Jun 2007 13:51:10 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from srvmail01.mem.int (correo.minem.gob.pe [200.37.156.5]) by postgresql.org (Postfix) with SMTP id B3AC49FB45A for ; Tue, 19 Jun 2007 13:51:08 -0300 (ADT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: RE: Ejecutar \copy desde VB Date: Tue, 19 Jun 2007 11:49:46 -0500 Message-ID: <52865C3823D7134E909B33D382298594227B80@srvmail01.mem.int> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [pgsql-es-ayuda] Ejecutar \copy desde VB Thread-Index: AceyiAz/U519yYNWRB69qUo+IXJ8ZgACVqEw References: <570797.97455.qm@web63713.mail.re1.yahoo.com> <52865C3823D7134E909B33D3822985942279D7@srvmail01.mem.int> <20070619154020.GO4265@alvh.no-ip.org> From: "Chapilliquen Gutierrez Eduardo" To: "Alvaro Herrera" Cc: "Jaime Casanova" , "Gabriel Hermes Colina Zambra" , X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.386 tagged_above=0 required=5 tests=AWL=0.250, BAYES_50=0.001, FORGED_RCVD_HELO=0.135 X-Spam-Level: X-Archive-Number: 200706/433 X-Sequence-Number: 28265 Lo que pasa es que voy a tener que cargar archivos de promedio 1 = mill=F3n de registros, y leer cada l=EDnea del archivo, va ser muy = lento, y uno de lo requerimientos que tengo es que la carga no demore = mas de 180 segundos, por eso no puedo cargar l=EDnea por l=EDnea el = archivo, que otra soluci=F3n pudo aplicar?? Saludos Eduardo=20 -----Mensaje original----- De: Alvaro Herrera [mailto:alvherre@commandprompt.com]=20 Enviado el: Tuesday, June 19, 2007 10:40 AM Para: Chapilliquen Gutierrez Eduardo CC: Jaime Casanova; Gabriel Hermes Colina Zambra; = pgsql-es-ayuda@postgresql.org Asunto: Re: [pgsql-es-ayuda] Ejecutar \copy desde VB Chapilliquen Gutierrez Eduardo escribi=F3: > Por lo que he le=EDdo y de las respuestas que me has brindado esto=20 > funciona porque tengo el postgre instalado localmente donde estoy=20 > desarrollando la aplicaci=F3n, pero cuando lo instale donde el cliente = > esto no ser=E1 as=ED, la Vd. estar=E1 en un servidor y la aplicaci=F3n = cliente=20 > en la PC del usuario. Correcto. > Lo =FAnico que se me ocurre es copiar el archivo en el servidor y = luego=20 > ejecutar el copy d=E1ndole la ruta del archivo ya en el servidor, me=20 > podr=EDan decir si con eso funcionaria sin problemas la carga del=20 > archivo?? La otra alternativa es que la aplicacion abra el archivo y lo lea linea = a linea, y le pase cada linea a un COPY FROM STDIN. Yo creo que eso es = mas "programable" que copiar el archivo al servidor. Estar moviendo = archivos de un lado a otro, en mi experiencia, es complicado = programaticamente (tienes que tener abierto un FTP, o un SSH, y que = funcione bien el asunto de darle las passwords, abrir los ports en el = firewall, etc). En resumen, un lio no solo para el programador sino = tambien para los administradores de red, etc. En cambio lo otro es = solamente cosa de escribir unas cuantas lineas de codigo. --=20 Alvaro Herrera = http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. From alvherre@commandprompt.com Tue Jun 19 17:11:07 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DEEC99FB6B8 for ; Tue, 19 Jun 2007 14:11:07 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 47267-02 for ; Tue, 19 Jun 2007 14:11:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id C44159F9F2B for ; Tue, 19 Jun 2007 14:10:59 -0300 (ADT) Received: from perhan.alvh.no-ip.org (190-13-143-52.bk13-dsl.surnet.cl [190.13.143.52]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l5JHAr7c031776; Tue, 19 Jun 2007 10:10:54 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 48D8532A23; Tue, 19 Jun 2007 13:10:50 -0400 (CLT) Date: Tue, 19 Jun 2007 13:10:50 -0400 From: Alvaro Herrera To: Chapilliquen Gutierrez Eduardo Cc: Jaime Casanova , Gabriel Hermes Colina Zambra , pgsql-es-ayuda@postgresql.org Subject: Re: Ejecutar \copy desde VB Message-ID: <20070619171050.GU4265@alvh.no-ip.org> References: <570797.97455.qm@web63713.mail.re1.yahoo.com> <52865C3823D7134E909B33D3822985942279D7@srvmail01.mem.int> <20070619154020.GO4265@alvh.no-ip.org> <52865C3823D7134E909B33D382298594227B80@srvmail01.mem.int> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52865C3823D7134E909B33D382298594227B80@srvmail01.mem.int> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Tue, 19 Jun 2007 10:10:54 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/434 X-Sequence-Number: 28266 Chapilliquen Gutierrez Eduardo escribió: > Lo que pasa es que voy a tener que cargar archivos de promedio 1 > millón de registros, y leer cada línea del archivo, va ser muy lento, > y uno de lo requerimientos que tengo es que la carga no demore mas de > 180 segundos, por eso no puedo cargar línea por línea el archivo, que > otra solución pudo aplicar?? Ah, o sea ya hiciste el programa y mediste que se demoraba mas que 180 segundos? No creo que realmente se vaya a demorar tanto. Un millon de registros no es gran cosa. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support From ECHAPILLIQUEN@minem.gob.pe Tue Jun 19 17:19:24 2007 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 837269FBA30 for ; Tue, 19 Jun 2007 14:19:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 54725-01 for ; Tue, 19 Jun 2007 14:19:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from srvmail01.mem.int (correo.minem.gob.pe [200.37.156.5]) by postgresql.org (Postfix) with SMTP id A71349FBE73 for ; Tue, 19 Jun 2007 14:19:13 -0300 (ADT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: RE: Ejecutar \copy desde VB Date: Tue, 19 Jun 2007 12:17:51 -0500 Message-ID: <52865C3823D7134E909B33D382298594227C29@srvmail01.mem.int> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [pgsql-es-ayuda] Ejecutar \copy desde VB Thread-Index: AceylKJIGpYW3tZhR2GtPzBFbqhyOQAAOxtQ 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> From: "Chapilliquen Gutierrez Eduardo" To: "Alvaro Herrera" Cc: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.35 tagged_above=0 required=5 tests=AWL=0.214, BAYES_50=0.001, FORGED_RCVD_HELO=0.135 X-Spam-Level: X-Archive-Number: 200706/436 X-Sequence-Number: 28268 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 Saludos Eduardo -----Mensaje original----- De: Alvaro Herrera [mailto:alvherre@commandprompt.com]=20 Enviado el: Tuesday, June 19, 2007 12:11 PM Para: Chapilliquen Gutierrez Eduardo CC: Jaime Casanova; Gabriel Hermes Colina Zambra; = pgsql-es-ayuda@postgresql.org Asunto: Re: [pgsql-es-ayuda] Ejecutar \copy desde VB Chapilliquen Gutierrez Eduardo escribi=F3: > Lo que pasa es que voy a tener que cargar archivos de promedio 1=20 > mill=F3n de registros, y leer cada l=EDnea del archivo, va ser muy = lento,=20 > y uno de lo requerimientos que tengo es que la carga no demore mas de=20 > 180 segundos, por eso no puedo cargar l=EDnea por l=EDnea el archivo, = que=20 > otra soluci=F3n pudo aplicar?? Ah, o sea ya hiciste el programa y mediste que se demoraba mas que 180 = segundos? No creo que realmente se vaya a demorar tanto. Un millon de registros = no es gran cosa. --=20 Alvaro Herrera = http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support From alvherre@commandprompt.com Tue Jun 19 17:26:21 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 8310F9FB66A for ; Tue, 19 Jun 2007 14:26:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 22763-05 for ; Tue, 19 Jun 2007 14:26:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id CB8EB9FB65C for ; Tue, 19 Jun 2007 14:26:17 -0300 (ADT) Received: from perhan.alvh.no-ip.org (190-13-143-52.bk13-dsl.surnet.cl [190.13.143.52]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l5JHQ2JI032309; Tue, 19 Jun 2007 10:26:02 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 1CECD32A23; Tue, 19 Jun 2007 13:25:59 -0400 (CLT) Date: Tue, 19 Jun 2007 13:25:59 -0400 From: Alvaro Herrera To: Chapilliquen Gutierrez Eduardo Cc: pgsql-es-ayuda@postgresql.org Subject: Re: Ejecutar \copy desde VB Message-ID: <20070619172559.GX4265@alvh.no-ip.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52865C3823D7134E909B33D382298594227C29@srvmail01.mem.int> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Tue, 19 Jun 2007 10:26:03 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.528 tagged_above=0 required=5 tests=AWL=-1.166, BAYES_50=0.001, FORGED_RCVD_HELO=0.135, RCVD_IN_BL_SPAMCOP_NET=1.558 X-Spam-Level: X-Archive-Number: 200706/438 X-Sequence-Number: 28270 Chapilliquen Gutierrez Eduardo escribió: > No, un no he hecho el programa con STDIN como me sugeriste, el tema es > que no se como debo leer después los datos para enviarlo a la tabla 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. -- Alvaro Herrera http://www.amazon.com/gp/registry/CTMLCN8V17R4 "Ninguna manada de bestias tiene una voz tan horrible como la humana" (Orual) From systemguards@gmail.com Tue Jun 19 23:33:29 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id E64099FB811 for ; Tue, 19 Jun 2007 20:33:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 12303-08 for ; Tue, 19 Jun 2007 20:33:21 -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.241]) by postgresql.org (Postfix) with ESMTP id E15759FB642 for ; Tue, 19 Jun 2007 20:33:25 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so446823ana for ; Tue, 19 Jun 2007 16:33:24 -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:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=q0+NSeFqh1HpYI2T+edajfEEWQ5YPLCOZ1XP3EfY2uFlCIDw7dpe4502RtAJaDV8AqevmWuNYUIxVgdSakJkfIp7d6+rm6JUQ2WRBqQbZurKpuw87mrwOwQ1oKKK5hB4bP2SP+cTiV+fbLgkXkjmt5PAdA3LJzeqZ8KAQcltRjs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dAOoIXnIhJdNLX1UcwkjYRXqVF5zkQpp13xM6uA/gzfztBIms8l9kk/fN/PgZ7lr0wOVucHn1fWwYl4NVvMZ0ClLsl5lzF7t9YonJpW8lGxE8B85P4xvuQum7xYq9eq1OhHvD1a+WyTkoM/Eudw8wHRM3eqhSOEFZzwXKuhPdtU= Received: by 10.100.197.15 with SMTP id u15mr2531665anf.1182296004684; Tue, 19 Jun 2007 16:33:24 -0700 (PDT) Received: by 10.100.45.15 with HTTP; Tue, 19 Jun 2007 16:33:24 -0700 (PDT) Message-ID: Date: Tue, 19 Jun 2007 23:33:24 +0000 From: "Jaime Casanova" To: "PostgreSQL SQL List" Subject: Fwd: [pgsql-es-ayuda] Ejecutar \copy desde VB In-Reply-To: <4677E189.9040107@yahoo.com.ar> 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> <4677E189.9040107@yahoo.com.ar> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/148 X-Sequence-Number: 28638 ---------- Forwarded message ---------- From: Carlos Alberto Silva Date: Jun 19, 2007 2:00 PM Subject: Re: [pgsql-es-ayuda] Ejecutar \copy desde VB To: Jaime Casanova Yo lo har=EDa de otra manera. Una rutina q lea el archivo de texto en VB (nada complicado de hacer) y luego los inserts correspondientes en la tabla via ODBC o como sea q me conecte a la base. IMHO.Carlos Jaime Casanova escribi=F3: > On 6/19/07, Gabriel Hermes Colina Zambra wrote: >> > >> Otra burda manera pero menos complicada, es crear un >> .bat que maneje set pgpassword=3Dclavedeusuariopostgres > > en vez de setear pgpassword deberias usar un archivo pgpass.conf > http://www.postgresql.org/docs/8.2/static/libpq-pgpass.html > >> y ejecutar el bat con la instruccion shell desde >> visual basic, quiza teniendo un lnk apuntando al bat. >> Es una idea burda pero funciona. >> > > pero creo, no estoy seguro porque Chapiliquen no lo dejo claro, que > quiere hacer eso desde un cliente y no desde el servidor... y dudo > mucho que quiera tener recursos compartidos en cada cliente solo para > eso... ahora que si esta dispuesto esa seria una solucion (claro que, > segun yo, necesitaria ejecutar el bat en el servidor) > > > --=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 From systemguards@gmail.com Tue Jun 19 23:42:14 2007 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 From alvherre@commandprompt.com Wed Jun 20 00:04:13 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 954479FB898 for ; Tue, 19 Jun 2007 21:04:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 63388-04 for ; Tue, 19 Jun 2007 21:04:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 0F65A9FB881 for ; Tue, 19 Jun 2007 21:04:08 -0300 (ADT) Received: from perhan.alvh.no-ip.org (190-13-143-52.bk13-dsl.surnet.cl [190.13.143.52]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l5K03kti012612; Tue, 19 Jun 2007 17:03:47 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id D0D1732A23; Tue, 19 Jun 2007 20:03:41 -0400 (CLT) Date: Tue, 19 Jun 2007 20:03:41 -0400 From: Alvaro Herrera To: Jaime Casanova Cc: Chapilliquen Gutierrez Eduardo , pgsql-es-ayuda@postgresql.org Subject: Re: Ejecutar \copy desde VB Message-ID: <20070620000341.GL21268@alvh.no-ip.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Tue, 19 Jun 2007 17:03:47 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/471 X-Sequence-Number: 28303 Jaime Casanova escribió: > >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... Como no se va a poder hacer una rutina para leer un archivo linea por linea :-( -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. From systemguards@gmail.com Wed Jun 20 00:19:06 2007 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 195619FB90F for ; Tue, 19 Jun 2007 21:19:06 -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 46492-05 for ; Tue, 19 Jun 2007 21:18:57 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.230]) by postgresql.org (Postfix) with ESMTP id 342BD9FB3D7 for ; Tue, 19 Jun 2007 21:19:02 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id s16so6189wxc for ; Tue, 19 Jun 2007 17:19:01 -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=HDSguKdrlK8v3OcjS5HnfWgXR2fRnJ55tN6cD3mh4s3+RMo5CCK4r3nyC9/YE1iC+PdnaRXWHzNmKpnhfMDwAu/YHaqsxjJDaJqOnGGOk08Bcj9/tWuydjPJbA9WnY93HZyAGGn7HnN9NMa+rqeDPI9wqXUfXnz2/b5KlpUoNOA= 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=OGRoh4yp6Ti1wAJ0jC4k51gGaODWvU6quDw/iLfIFdjjzWKSXtOFf5PtNMncPfpwH8e5uLEolde6gUJ43RLIrNSyxF0R6R7/c7SVLpe/2L1sXdW35qtlNhJhGIhjuc1P+b0M9ZW0GstJiFbnHDBOQ8+RberJlysEjMFXdYUhyNQ= Received: by 10.100.8.18 with SMTP id 18mr19909anh.1182298740985; Tue, 19 Jun 2007 17:19:00 -0700 (PDT) Received: by 10.100.45.15 with HTTP; Tue, 19 Jun 2007 17:19:00 -0700 (PDT) Message-ID: Date: Wed, 20 Jun 2007 00:19:00 +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: <20070620000341.GL21268@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: <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> <20070620000341.GL21268@alvh.no-ip.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=AWL=-0.001, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200706/472 X-Sequence-Number: 28304 On 6/20/07, Alvaro Herrera wrote: > Jaime Casanova escribi=F3: > > > >Bueno, si no sabes programar en el lenguaje que estas utilizando, no e= s > > >en esta lista donde debes consultar. Lo unico que te puedo decir es q= ue > > >en C lo harias con la rutina PQputCopyData, y terminas con PQputCopyEn= d. > > >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... > > Como no se va a poder hacer una rutina para leer un archivo linea por > linea :-( > eso si... enviarlo a STDIN es otro asunto... la mayoria de los que usan VB ni siquiera saben que es eso :) --=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 From alvherre@commandprompt.com Wed Jun 20 02:35:46 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 6FA069FB4DC for ; Tue, 19 Jun 2007 23:35:46 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 46801-05 for ; Tue, 19 Jun 2007 23:35:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 27A8D9FB45E for ; Tue, 19 Jun 2007 23:35:42 -0300 (ADT) Received: from perhan.alvh.no-ip.org (190-13-143-52.bk13-dsl.surnet.cl [190.13.143.52]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l5K2ZfAM016972; Tue, 19 Jun 2007 19:35:42 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 60E2C32A28; Tue, 19 Jun 2007 22:35:36 -0400 (CLT) Date: Tue, 19 Jun 2007 22:35:36 -0400 From: Alvaro Herrera To: Jaime Casanova Cc: Chapilliquen Gutierrez Eduardo , pgsql-es-ayuda@postgresql.org Subject: Re: Ejecutar \copy desde VB Message-ID: <20070620023536.GA7972@alvh.no-ip.org> References: <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> <20070620000341.GL21268@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Tue, 19 Jun 2007 19:35:44 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/474 X-Sequence-Number: 28306 Jaime Casanova escribió: > On 6/20/07, Alvaro Herrera wrote: > >Jaime Casanova escribió: > > > >> >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... > > > >Como no se va a poder hacer una rutina para leer un archivo linea por > >linea :-( > > eso si... enviarlo a STDIN es otro asunto... la mayoria de los que > usan VB ni siquiera saben que es eso :) Ehhh! Pero no necesitas enviarlo a STDIN!! Lo unico que necesitas es pasarle la linea a PQputCopyEnd. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. From systemguards@gmail.com Wed Jun 20 05:20:30 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id F0F419FBC76 for ; Wed, 20 Jun 2007 02:20:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 02624-04-2 for ; Wed, 20 Jun 2007 02:19:51 -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.242]) by postgresql.org (Postfix) with ESMTP id CF26F9FB8D9 for ; Wed, 20 Jun 2007 02:11:35 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so10777ana for ; Tue, 19 Jun 2007 22:11:33 -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=gQ4f+E0PQGxix2Jf2GxrzJkgLROs1yQkxHEAw9DRSJIZsFZfbBIsVlfYxrdBqnOP3d7DUrgGod0z02/WM4ujde/jQGHIHrXJvmEH55V3YgJSrauEUoG7xy3Lif1bGtal+bc69Jtbt/0Y5QDrxMKuJasqwA3Q3S5fMqOiEtCz+9U= 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=o9GkzHdBiuFE9ZMakeui8A/+sQmpGA4HLhvhxbL1jUmc9QmIBNlX3hJwFTBg5jRlLv+aBouSeAJ6lCyC1oYi+eZKPpW7AKfNodWRWGnNIbTXd0Ntf+YtmoYhUFxH44IWiaXwp8j9Ad3cmKQNcFkRb7zGnA5dE25l7TaPzMsjghs= Received: by 10.100.9.19 with SMTP id 19mr154919ani.1182316293182; Tue, 19 Jun 2007 22:11:33 -0700 (PDT) Received: by 10.100.45.15 with HTTP; Tue, 19 Jun 2007 22:11:33 -0700 (PDT) Message-ID: Date: Wed, 20 Jun 2007 05:11:33 +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: <20070620023536.GA7972@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: <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> <20070620000341.GL21268@alvh.no-ip.org> <20070620023536.GA7972@alvh.no-ip.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/479 X-Sequence-Number: 28311 On 6/20/07, Alvaro Herrera wrote: > Jaime Casanova escribi=F3: > > On 6/20/07, Alvaro Herrera wrote: > > >Jaime Casanova escribi=F3: > > > > > >> >Bueno, si no sabes programar en el lenguaje que estas utilizando, n= o es > > >> >en esta lista donde debes consultar. Lo unico que te puedo decir e= s que > > >> >en C lo harias con la rutina PQputCopyData, y terminas con PQputCop= yEnd. > > >> >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 cuent= a > > >> que VB no es lenguaje real... > > > > > >Como no se va a poder hacer una rutina para leer un archivo linea por > > >linea :-( > > > > eso si... enviarlo a STDIN es otro asunto... la mayoria de los que > > usan VB ni siquiera saben que es eso :) > > Ehhh! Pero no necesitas enviarlo a STDIN!! Lo unico que necesitas es > pasarle la linea a PQputCopyEnd. > Claro, a traves de libpq... que no es el caso porque esta conectado a traves de odbc (probablemente, usando ADO) Y creeme trabajar con librerias de terceros en Vb it's a pain in the ;)... por cierto, tendria que abrir una segunda conexion a la base con libpq para poder ejecutar PQputCopyData y PQputCopyEnd? a menos que alguien me diga que se puede usar las funciones de libpq a traves de ADO... --=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 From hermeszambra@yahoo.com Wed Jun 20 07:41:46 2007 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 25F179FB8AB for ; Wed, 20 Jun 2007 04:41:46 -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 31512-09 for ; Wed, 20 Jun 2007 04:41:36 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from web63707.mail.re1.yahoo.com (web63707.mail.re1.yahoo.com [69.147.97.92]) by postgresql.org (Postfix) with SMTP id BC1D89FB8E3 for ; Wed, 20 Jun 2007 04:41:38 -0300 (ADT) Received: (qmail 60057 invoked by uid 60001); 20 Jun 2007 07:41:37 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=v4thqrTE0S1lTpE5/TcNuAZIPI9QrV01kLtmipQaCpSu/5Tq7Qm0ww4ed4S2x76hcAWyc1AbbZhr4EBo7Vx58a+8hY6+PNYHAgwbNiigEQUAFo/XlyL50ypR/RmBfagwzOh66pdD+XXic7SFj7TYYLwOKbw/sCxnlBy3KEb82Lw=; X-YMail-OSG: 8nK.rsAVM1k1fNRBcDbtoqwYLIBdlif.XkYH0aflwEJ2987kpu_ZFlvfQtUjVQN9b3jmfrZVCbzoMBDXw5vqqyGpdQ-- Received: from [190.64.193.182] by web63707.mail.re1.yahoo.com via HTTP; Wed, 20 Jun 2007 02:41:37 CDT Date: Wed, 20 Jun 2007 02:41:37 -0500 (CDT) From: Gabriel Hermes Colina Zambra Subject: Re: Ejecutar \copy desde VB To: Alvaro Herrera , Jaime Casanova Cc: Chapilliquen Gutierrez Eduardo , pgsql-es-ayuda@postgresql.org In-Reply-To: <20070620023536.GA7972@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <591795.59166.qm@web63707.mail.re1.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.107 tagged_above=0 required=5 tests=AWL=-0.249, BAYES_50=0.001, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, DNS_FROM_RFC_WHOIS=1.447 X-Spam-Level: *** X-Archive-Number: 200706/484 X-Sequence-Number: 28316 Y esta solucion que contra tiene Private Sub Command1_Click() Datapsql.Conpsql.Open Datapsql.Conpsql.Execute "copy central.articulos to '/pc_respaldo/pruebita.sql'" End Sub Datapsql es un dataenviroment, estoy con VB6, el dataenviroment apunta al odbc definido previamente que se conecta a la bd. Bueno con la conexcion conpsql del datapsql y el execute lo resuelvo. Ahora el camino si es hacia una carpeta del equipo cliente seria //nombrepc/carpetacompartidaencliente/pruebita.sql" pero no seria un to si no un from. Para mi el problema si mal no entendi estaria resuelto de esta manera sin tantas complicaciones, puesto que mi solucion anterior del bat era fea. Atte. Gabriel Hermes Colina Zambra __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.espanol.yahoo.com/ From hermeszambra@yahoo.com Wed Jun 20 07:47:13 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 001239FBD2E for ; Wed, 20 Jun 2007 04:47:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 66988-08 for ; Wed, 20 Jun 2007 04:47:08 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from web63706.mail.re1.yahoo.com (web63706.mail.re1.yahoo.com [69.147.97.91]) by postgresql.org (Postfix) with SMTP id 20A419FBC9B for ; Wed, 20 Jun 2007 04:47:10 -0300 (ADT) Received: (qmail 25647 invoked by uid 60001); 20 Jun 2007 07:47:09 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=gS+dEk4Va+nDuuJ4g+fGUVZMVHy99ricOeTEe5cDQgm15OE9lL+snY3LhuVMkbuKcaQaoMQCAKGa+XvJQjLlOGmIOQnjrFDWWUXYYt6MKEkkJq0CcswZMlmwpqYV7J8sJu4dxZj4aX0dSjJOIfk60XINcIQpe2nVbL3FhOa4J94=; X-YMail-OSG: 9ySOffAVM1mwKw_q3qkKRz3iJIi5aYq1lAvHrDUJQypz7nt8eBfA0a6.YWX1tL3RvZiftTQnRJ7DGKYDzPeA_MW8WcYLuywTIRk- Received: from [190.64.193.182] by web63706.mail.re1.yahoo.com via HTTP; Wed, 20 Jun 2007 02:47:08 CDT Date: Wed, 20 Jun 2007 02:47:08 -0500 (CDT) From: Gabriel Hermes Colina Zambra Subject: Re: Ejecutar \copy desde VB To: Alvaro Herrera , Jaime Casanova Cc: Chapilliquen Gutierrez Eduardo , pgsql-es-ayuda@postgresql.org In-Reply-To: <20070620023536.GA7972@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <989210.24330.qm@web63706.mail.re1.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.108 tagged_above=0 required=5 tests=AWL=-0.248, BAYES_50=0.001, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, DNS_FROM_RFC_WHOIS=1.447 X-Spam-Level: *** X-Archive-Number: 200706/485 X-Sequence-Number: 28317 Efectivamente aca esta la prueba, con el archivo en el cliente Private Sub Command1_Click() Datapsql.Conpsql.Open Datapsql.Conpsql.Execute "copy central.articulos to '//Pcmovilgc/bajados/pruebita.sql'" End Sub Jaime, no es un lenguaje enserio, pero hay cosas que se resuelven facil, aunque parezcan complicadas. Si se tiene un Linux como servidor, propongo hacerlo con samba y listo. Atte Gabriel Hermes Colina Zambra __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.espanol.yahoo.com/ From systemguards@gmail.com Wed Jun 20 12:45:25 2007 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 14F1C9FBE7D for ; Wed, 20 Jun 2007 09:45:25 -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 70140-07 for ; Wed, 20 Jun 2007 09:45:14 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.251]) by postgresql.org (Postfix) with ESMTP id 0001F9FBE20 for ; Wed, 20 Jun 2007 09:45:18 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so30764ana for ; Wed, 20 Jun 2007 05:45:17 -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=arZYZcKptZEezDsQvWm9Vc713Ku22MaFztNpszt6DXMBtiGcnhsg62rjjSDL8eODcuftnCCFg1tsDPq9k6eXSYc/qHBts0zYCg1V2RJ2aa6iF+Sj6od+eN2NEowQfDe0gQFDutJ0z47o0FHLMBXY5t309eclPQrU6B6JnRtrcMU= 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=aWoxnKNS1Q6vwDVTLw2PHn4InDkF8QH8BmI3Kg/PuGyFDWMHt2TPVDzOLsQyziSnZ0eFkVENnqEnn1S1ErmHJfYY5XMkFc8UeJoyA9qYd5vwQts4rSEdRf0W9HGjXoS7m3HoRsDKayxEsHhYNhPw8TDYNziBC+Ra/6Lw07aea4s= Received: by 10.100.9.19 with SMTP id 19mr349371ani.1182343517338; Wed, 20 Jun 2007 05:45:17 -0700 (PDT) Received: by 10.100.45.15 with HTTP; Wed, 20 Jun 2007 05:45:17 -0700 (PDT) Message-ID: Date: Wed, 20 Jun 2007 12:45:17 +0000 From: "Jaime Casanova" To: "Gabriel Hermes Colina Zambra" Subject: Re: Ejecutar \copy desde VB Cc: "Alvaro Herrera" , "Chapilliquen Gutierrez Eduardo" , pgsql-es-ayuda@postgresql.org In-Reply-To: <591795.59166.qm@web63707.mail.re1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070620023536.GA7972@alvh.no-ip.org> <591795.59166.qm@web63707.mail.re1.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/490 X-Sequence-Number: 28322 On 6/20/07, Gabriel Hermes Colina Zambra wrote: > > Y esta solucion que contra tiene > > > Private Sub Command1_Click() > Datapsql.Conpsql.Open > Datapsql.Conpsql.Execute "copy central.articulos to > '/pc_respaldo/pruebita.sql'" > End Sub > [...] > > Ahora el camino si es hacia una carpeta del equipo > cliente seria > //nombrepc/carpetacompartidaencliente/pruebita.sql" > pero no seria un to si no un from. > > Para mi el problema si mal no entendi estaria resuelto > de esta manera sin tantas complicaciones, puesto que > mi solucion anterior del bat era fea. > mmm... y como determinas de que maquina se esta ejecutando esa sentencia para armar la sentencia? Bueno supomgo que ese es el menor problema... el nombre del recurso compartido lo grabaras en alguna tabla? todos los clientes deben tener el mismo nombre de recurso compartido? ahh... y ahora el meollo del asunto... permisos... claro siempre puedes definir una carpeta especial para eso... pero a muchos administradores de red les molesta esas carpetas compartidas... si no tienes uno de esos, claro esa solucion funciona (no que me guste, pero funciona ;) -- 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 From alvherre@commandprompt.com Wed Jun 20 12:59:22 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1B4419FB56D for ; Wed, 20 Jun 2007 09:59:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 63102-03 for ; Wed, 20 Jun 2007 09:59:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 988909FBE5F for ; Wed, 20 Jun 2007 09:59:18 -0300 (ADT) Received: from perhan.alvh.no-ip.org (190-13-143-52.bk13-dsl.surnet.cl [190.13.143.52]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l5KCwxPp002651; Wed, 20 Jun 2007 05:59:00 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id C64BE32A2C; Wed, 20 Jun 2007 08:58:57 -0400 (CLT) Date: Wed, 20 Jun 2007 08:58:57 -0400 From: Alvaro Herrera To: Gabriel Hermes Colina Zambra Cc: Jaime Casanova , Chapilliquen Gutierrez Eduardo , pgsql-es-ayuda@postgresql.org Subject: Re: Ejecutar \copy desde VB Message-ID: <20070620125857.GA30369@alvh.no-ip.org> References: <20070620023536.GA7972@alvh.no-ip.org> <989210.24330.qm@web63706.mail.re1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <989210.24330.qm@web63706.mail.re1.yahoo.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Wed, 20 Jun 2007 05:59:01 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/493 X-Sequence-Number: 28325 Gabriel Hermes Colina Zambra escribió: > > Efectivamente aca esta la prueba, con el archivo en el > cliente > Private Sub Command1_Click() > Datapsql.Conpsql.Open > Datapsql.Conpsql.Execute "copy central.articulos to > '//Pcmovilgc/bajados/pruebita.sql'" > End Sub Esto es COPY TO, lo que se discute es COPY FROM ... Por otro lado aqui lo que veo es que estas usando una "carpeta compartida" para hacer que el archivo se vea en el servidor. (El equivalente moral en Unix seria tener el archivo en un directorio NFS, y a una solucion como esa le caeria de inmediato un tiro en la cabeza a quemarropa por inseguridad). La gente siempre viene aca y pregunta si Postgres es Windows "es estable" y todo eso. Yo me pregunto si realmente el asunto importante sera si en Windows las herramientas te permiten hacer cosas que funcionen. -- Alvaro Herrera http://www.amazon.com/gp/registry/DXLWNGRJD34J "La primera ley de las demostraciones en vivo es: no trate de usar el sistema. Escriba un guión que no toque nada para no causar daños." (Jakob Nielsen) From hermeszambra@yahoo.com Wed Jun 20 22:31:35 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id B0E3E9FBFDE for ; Wed, 20 Jun 2007 19:31:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 03642-01 for ; Wed, 20 Jun 2007 19:31:25 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from web63706.mail.re1.yahoo.com (web63706.mail.re1.yahoo.com [69.147.97.91]) by postgresql.org (Postfix) with SMTP id 70EA29FB2A4 for ; Wed, 20 Jun 2007 19:31:29 -0300 (ADT) Received: (qmail 84895 invoked by uid 60001); 20 Jun 2007 22:31:27 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=So1WnrPx3VNDxTcShcUu3PsiGjDcO+K58WM1agv79dS3JrcLQZtfhnPiptEVvv4QRYvqJ+5E/5XWQ+wG/9YmjwoGjHa6+MUisLLlKHCw0HJ6ljxAObztyaDCKrkXvTsGX9mMJl/iqnCbkGnFqc7gKog6D5xgBihirCiMhz/QLWw=; X-YMail-OSG: r16I.UYVM1kotfY35vsQOgrmdJ.Or_X7TtvIunBDE_X2nx4eQx1unjHHEbprbjaacw-- Received: from [190.64.213.23] by web63706.mail.re1.yahoo.com via HTTP; Wed, 20 Jun 2007 17:31:27 CDT Date: Wed, 20 Jun 2007 17:31:27 -0500 (CDT) From: Gabriel Hermes Colina Zambra Subject: Re: Ejecutar \copy desde VB To: Jaime Casanova Cc: Alvaro Herrera , Chapilliquen Gutierrez Eduardo , pgsql-es-ayuda@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <304813.83651.qm@web63706.mail.re1.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.109 tagged_above=0 required=5 tests=AWL=-0.247, BAYES_50=0.001, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, DNS_FROM_RFC_WHOIS=1.447 X-Spam-Level: *** X-Archive-Number: 200706/516 X-Sequence-Number: 28348 --- Jaime Casanova escribió: > On 6/20/07, Gabriel Hermes Colina Zambra > wrote: > > > > Y esta solucion que contra tiene > > > > > > Private Sub Command1_Click() > > Datapsql.Conpsql.Open > > Datapsql.Conpsql.Execute "copy central.articulos > to > > '/pc_respaldo/pruebita.sql'" > > End Sub > > > [...] > > > > Ahora el camino si es hacia una carpeta del equipo > > cliente seria > > > //nombrepc/carpetacompartidaencliente/pruebita.sql" > > pero no seria un to si no un from. > > > > Para mi el problema si mal no entendi estaria > resuelto > > de esta manera sin tantas complicaciones, puesto > que > > mi solucion anterior del bat era fea. > > > > mmm... y como determinas de que maquina se esta > ejecutando esa > sentencia para armar la sentencia? Bueno supomgo que > ese es el menor > problema... > > el nombre del recurso compartido lo grabaras en > alguna tabla? todos > los clientes deben tener el mismo nombre de recurso > compartido? > > ahh... y ahora el meollo del asunto... permisos... > claro siempre > puedes definir una carpeta especial para eso... pero > a muchos > administradores de red les molesta esas carpetas > compartidas... si no > tienes uno de esos, claro esa solucion funciona (no > que me guste, pero > funciona ;) > > -- > 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 > Si el Cliente, comparte una carpeta, el archivo se graba ahi, el camino lo armas con el nombre del pc eso en visual es facil, ademas si fuera en un linux, tendria un samba y listo. Entonces todos graban en una carpeta compartida del samba, o del server. Tambien podrias crear unas ventanas con los controles drive, dir y file y ubicar el archivo donde sea, siempre que esa carpeta este compartida. Me parece que por ahi anda la solucion. Atte. Gabriel Hermes Colina Zambra __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.espanol.yahoo.com/ From hermeszambra@yahoo.com Wed Jun 20 23:14:35 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 4A8D19FBE3C for ; Wed, 20 Jun 2007 20:14:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 54435-04 for ; Wed, 20 Jun 2007 20:14:25 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from web63703.mail.re1.yahoo.com (web63703.mail.re1.yahoo.com [69.147.97.88]) by postgresql.org (Postfix) with SMTP id D58629FB5EC for ; Wed, 20 Jun 2007 20:14:28 -0300 (ADT) Received: (qmail 91344 invoked by uid 60001); 20 Jun 2007 23:14:27 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=h010NHz/7cc/xmyCxxXoNb0XEHWt6tc4O+GYom1SL2i1y8gxWcv2FTDr5rgORg0BiFqBjq/QtkW6DmE51BdYsNPo0dkmWLL8SW5jAuUYSBNZQFDbRdq9/fdHBLLEcL39PMlTZjgUE6KqbOugGPOCVPZ1P6IUvLoQ961RDen2F4c=; X-YMail-OSG: lvnhQ4MVM1k6DJUZTefhoXtYUordkD1kNGM4w3657.Rl6OlnVIVPoTIpFDog2z_mHPdxobzuG3_3dzoHFfzEyodJhFGsNxO4dYW_ Received: from [190.64.213.23] by web63703.mail.re1.yahoo.com via HTTP; Wed, 20 Jun 2007 18:14:26 CDT Date: Wed, 20 Jun 2007 18:14:26 -0500 (CDT) From: Gabriel Hermes Colina Zambra Subject: Re: Ejecutar \copy desde VB To: Alvaro Herrera Cc: Jaime Casanova , Chapilliquen Gutierrez Eduardo , pgsql-es-ayuda@postgresql.org In-Reply-To: <20070620125857.GA30369@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <71026.91329.qm@web63703.mail.re1.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.111 tagged_above=0 required=5 tests=AWL=-0.245, BAYES_50=0.001, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, DNS_FROM_RFC_WHOIS=1.447 X-Spam-Level: *** X-Archive-Number: 200706/518 X-Sequence-Number: 28350 --- Alvaro Herrera escribió: > Gabriel Hermes Colina Zambra escribió: > > > > Efectivamente aca esta la prueba, con el archivo > en el > > cliente > > Private Sub Command1_Click() > > Datapsql.Conpsql.Open > > Datapsql.Conpsql.Execute "copy central.articulos > to > > '//Pcmovilgc/bajados/pruebita.sql'" > > End Sub > > Esto es COPY TO, lo que se discute es COPY FROM ... > Por otro lado aqui > lo que veo es que estas usando una "carpeta > compartida" para hacer que > el archivo se vea en el servidor. TO o FROM se ejecutan lo mismo. No se si en linux una carpeta compartida en samba, vuelve inseguro el sistema, por lo que comentas abajo si, pero en windows y en UNIX hay maneras de compartir la carpeta de forma limitada a un usuario o grupo de usuarios. (El equivalente > moral en Unix seria > tener el archivo en un directorio NFS, y a una > solucion como esa le > caeria de inmediato un tiro en la cabeza a > quemarropa por inseguridad). > Mi experiencia me dice que puedo controlar esto en un windows 2000 > La gente siempre viene aca y pregunta si Postgres es > Windows "es > estable" y todo eso. Yo me pregunto si realmente el > asunto importante > sera si en Windows las herramientas te permiten > hacer cosas que funcionen. Y si, de hecho fijate en Genexus. el tema es que requiere un cambio de mentalidad que le vendria bien a linux para poder liderar el mercado. Lo que si te puedo asegurar que lo haces en menores tiempos de desarrollo. En Windows, los usuarios pueden tener herramientas de uso mas intuitivo, si no fijate por que Open Office una herramienta de la que se habla mucho en Linux, es un clon de MS Office, pero a ningun usuario previemente adaptado a MS Office, le da lo mismo el cambio Con el mismo trabajo que te lleva en linux, quiza un poco menos. Yo no te subestimo Alvaro, pero vos sabes al igual que yo que en windows se puede trabajar si sabes y si no sabes, eso en linux no pasa en linux tenes que saber, pero si vos seguis las politicas de seguridad que te marcan en los cursos oficiales de ingenieria de microsoft y te quemas las pestanias podes hacer buenos desarrollos que funcionan. Creo que la lista de desarrollos nos mostraria que lamentablemente hay mas empresas en latam con cosas que funcionan y son usuables por los usuarios finales en las empresas que elaboraron bajo windows, que en Linux, mal que nos pese. Si bien no comparto la filosofia de Microsoft, cuando la ataco la ataco por sus verdaderos puntos debiles y no por puntos traidos para justificar el hecho de que en el lado de las herramientas que uso, todavia no se crearon standares para las empresas que sean abrazados como son abrazados los paquetes de una empresa que aunque no nos guste, tiene un gran peso en el mercado. Atte. Gabriel Hermes Colina Zambra > > -- > Alvaro Herrera > http://www.amazon.com/gp/registry/DXLWNGRJD34J > "La primera ley de las demostraciones en vivo es: no > trate de usar el sistema. > Escriba un guión que no toque nada para no causar > daños." (Jakob Nielsen) > -- > ---------------------------(fin del > mensaje)--------------------------- > TIP 3: si publicas/lees desde Usenet, por favor > envía "subscribe-nomail" > a majordomo@postgresql.org para que tus > mensajes puedan llegar > a los suscriptores de la lista > __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.espanol.yahoo.com/ From alvherre@commandprompt.com Fri Jun 22 15:35:39 2007 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 06F469FC381 for ; Fri, 22 Jun 2007 12:35:39 -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 98675-08 for ; Fri, 22 Jun 2007 12:35:35 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id EB9369FC362 for ; Fri, 22 Jun 2007 12:35:34 -0300 (ADT) Received: from perhan.alvh.no-ip.org (201-220-125-150.bk10-dsl.surnet.cl [201.220.125.150]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l5MFZVsP024039; Fri, 22 Jun 2007 08:35:32 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 0A21D32A29; Fri, 22 Jun 2007 11:35:28 -0400 (CLT) Date: Fri, 22 Jun 2007 11:35:27 -0400 From: Alvaro Herrera To: Gabriel Hermes Colina Zambra Cc: Jaime Casanova , Chapilliquen Gutierrez Eduardo , pgsql-es-ayuda@postgresql.org Subject: Re: Ejecutar \copy desde VB Message-ID: <20070622153527.GJ8949@alvh.no-ip.org> References: <20070620125857.GA30369@alvh.no-ip.org> <71026.91329.qm@web63703.mail.re1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <71026.91329.qm@web63703.mail.re1.yahoo.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Fri, 22 Jun 2007 08:35:33 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/570 X-Sequence-Number: 28402 Gabriel Hermes Colina Zambra escribió: > No se si en linux una carpeta compartida en samba, > vuelve inseguro el sistema, por lo que comentas abajo > si, pero en windows y en UNIX hay maneras de compartir > la carpeta de forma limitada a un usuario o grupo de > usuarios. Si tu solucion requiere que el servidor ande montando carpetas aleatoriamente, desde mi punto de vista la solucion no es aceptable. Por razones de seguridad, el servidor deberia ser una maquina aislada. Pero si Eduardo prefiere compartir carpetas para hacer esto, alla el. Pero ya sabe cuales son las alternativas que tiene. -- Alvaro Herrera http://www.amazon.com/gp/registry/CTMLCN8V17R4 "Los románticos son seres que mueren de deseos de vida"