Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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




pgsql-interfaces by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group