ID:               37124
 User updated by:  ahaig at penguinmilitia dot net
 Reported By:      ahaig at penguinmilitia dot net
-Status:           Feedback
+Status:           Open
 Bug Type:         PDO related
 Operating System: Mac OS X 10.4.6
 PHP Version:      5.1.2
 Assigned To:      wez
 New Comment:

Just tried that. stream_get_line( $row['args'], 100 ) 
outputs:

tables_mainclassname_fkey


Previous Comments:
------------------------------------------------------------------------

[2006-04-19 14:44:52] [EMAIL PROTECTED]

Sounds like a LOB type... tried using the streams functions to read it?
(the resource is a stream).

------------------------------------------------------------------------

[2006-04-19 09:58:31] [EMAIL PROTECTED]

Assigned to the maintainer.

------------------------------------------------------------------------

[2006-04-18 18:10:56] ahaig at penguinmilitia dot net

pg_trigger.tgargs is a built in column in template1...

Looks like it's a bytea type.

(\d pg_trigger)

------------------------------------------------------------------------

[2006-04-18 18:07:37] [EMAIL PROTECTED]

What is the postgres data type you return here?

------------------------------------------------------------------------

[2006-04-18 18:04:15] ahaig at penguinmilitia dot net

I guess I didn't include <?php ?> but I thought I included a 
full script. You will need to fill in $dsn $user and 
$password and $table as appropriate. 

$dsn should refer to a PostgreSQL DB, $table to a table with 
at least 1 foreign key.

Script:

<?php
$database = new PDO( $dsn, $user, $password );
$statement = $database->prepare("SELECT t.tgargs as args 
FROM pg_trigger t,pg_class c,pg_proc p WHERE t.tgenabled AND 
t.tgrelid = c.oid AND t.tgfoid = p.oid AND p.proname = 
'RI_FKey_check_ins' AND c.relname =:tablename ORDER BY 
t.tgrelid");
$table = '<name of table in database with at least 1 foreign 
key>';
$statement->bindParam( ':tablename', $table );
$statement->execute();
print_r($statement->fetchAll());
die("Here's my error!");
?>

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/37124

-- 
Edit this bug report at http://bugs.php.net/?id=37124&edit=1

Reply via email to