Dereferencing PG_Result

From: david(at)tte(dot)tamu(dot)edu
To: PostgreSQL Interfaces Mailing List <pgsql-interfaces(at)postgresql(dot)org>
Subject: Dereferencing PG_Result
Date: 1998-11-23 15:52:46
Message-ID: Pine.LNX.3.96.981123094628.21949C-100000@tte.tamu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Here's the code:

#!/usr/bin/perl

use Pg

$conn = Pg::connectdb("dbname = mydb");
$result = $conn->exec("select * from mytable");

print $result "\n";

----end code---

This is what's returned:

PG_results=SCALAR(0x8110e14)

----end result-----
Mydb has a table mytable with a field myfield. There are two tuples.

Question: How can I deference the pointer to get at the actual data?

David Sweeney
david(at)tte(dot)tamu(dot)edu

Browse pgsql-interfaces by date

  From Date Subject
Next Message Ken Wills 1998-11-23 15:58:48 RE: [INTERFACES] RE: your mail (Should have been problems with ')
Previous Message Dirk Lutzebaeck 1998-11-23 15:42:47 rule plan string too big.