🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.lang.perl
3 messages
3 total messages Started by pasman Thu, 14 May 2009 10:02
perl + odbc
#51376
Author: pasman
Date: Thu, 14 May 2009 10:02
12 lines
1499 bytes
witam.

pisze prosty skrypt w perlu importujący plik do tabeli.
skrypt łączy się przez odbc (psqlodbc) do bazy postgres (8.3)
chciałbym użyć polecenia

use DBI;
$dbh->do('COPY matrix.test FROM STDIN ')

jak wysłać dane do tego polecenia ?

pasman
Re: perl + odbc
#51377
Author: Szymon Sokół
Date: Thu, 14 May 2009 16:34
23 lines
1929 bytes
On Thu, 14 May 2009 03:02:41 -0700 (PDT), pasman wrote:

> witam.
> 
> pisze prosty skrypt w perlu importujący plik do tabeli.
> skrypt łączy się przez odbc (psqlodbc) do bazy postgres (8.3)
> chciałbym użyć polecenia
> 
> use DBI;
> $dbh->do('COPY matrix.test FROM STDIN ')
> 
> jak wysłać dane do tego polecenia ?

Przykład znajdziesz w
http://archives.postgresql.org/pgsql-interfaces/2004-09/msg00005.php
w funkcji copy_from_stdin, ale mam wrażenie, że nie jest rozwiązanie, które
należałoby zalecać.

-- 
Szymon Sokół (SS316-RIPE) -- Network Manager                                 B
Computer Center, AGH - University of Science and Technology, Cracow, Poland  O
http://home.agh.edu.pl/szymon/ PGP key id: RSA: 0x2ABE016B, DSS: 0xF9289982  F
Free speech includes the right not to listen, if not interested -- Heinlein  H
Re: perl + odbc
#51378
Author: pasman
Date: Fri, 15 May 2009 07:16
10 lines
1610 bytes
> Przykład znajdziesz whttp://archives.postgresql.org/pgsql-interfaces/2004-09/msg00005.php
> w funkcji copy_from_stdin, ale mam wrażenie, że nie jest rozwiązanie, które
> należałoby zalecać.
>


dzieki. potestuje jak to chodzi


pasman
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads