Re: COPY doesnt work on views
| От | rob |
|---|---|
| Тема | Re: COPY doesnt work on views |
| Дата | |
| Msg-id | 001801c06505$d878c850$4100fd0a@cabrion.org обсуждение исходный текст |
| Ответ на | Reliability Stability of PgSQL & it's JDBC driver ("Nikhil G. Daddikar" <ngd@iname.com>) |
| Список | pgsql-general |
I use DBD/DBI in perl.
use DBI;
my $dbh =
DBI->connect("dbi:Pg:dbname=YourDatabase;host=localhost",'username','passwor
d');
my $sth = $dbh->prepare("select * from my_view");
$sth->execute;
my @row;
while (@ row = $sth->fetchrow_array) {
print join("\t",@row); #or whatever
}
$sth->finish;
$dbh->disconnect;
I'm sure the other postgres/perl interfaces have similar capabilities.
--rob
----- Original Message -----
From: "Steve Heaven" <steve@thornet.co.uk>
To: "rob" <rob@cabrion.com>
Sent: Wednesday, December 13, 2000 2:35 AM
Subject: Re: COPY doesnt work on views
> At 23:55 12/12/00 -0500, you wrote:
> >Try "\o somefile" , then run select & from your_view. See also \pset
> >
>
> Yes I know that I can do it from psql, but I want to achieve the same
thing
> from a Perl CGI script.
>
> Steve
>
> --
> thorNET - Internet Consultancy, Services & Training
> Phone: 01454 854413
> Fax: 01454 854412
> http://www.thornet.co.uk
>
В списке pgsql-general по дате отправления: