From: | "rob" <rob(at)cabrion(dot)com> |
---|---|
To: | "Steve Heaven" <steve(at)thornet(dot)co(dot)uk> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: COPY doesnt work on views |
Date: | 2000-12-13 13:08:53 |
Message-ID: | 001801c06505$d878c850$4100fd0a@cabrion.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)thornet(dot)co(dot)uk>
To: "rob" <rob(at)cabrion(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Martin A. Marques | 2000-12-13 14:37:30 | Re: manuals |
Previous Message | Trewern, Ben | 2000-12-13 11:31:15 | RE: info please |