note 54127 added to function.pg-meta-data
| From: | rburghol at vt dot edu | Date: | Fri, 24 Jun 2005 13:37:01 +0000 |
| Subject: | note 54127 added to function.pg-meta-data | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90893@lists.php.net to get a copy of this message | ||
When querying on meta data from a temp table, the meta data seems to persist even if a fresh
connection is established, where the temp table no longer exists.
For example, if you create a connection and a temp table like so:
$dbconn1 = pg_connect('blah blah', , PGSQL_CONNECT_FORCE_NEW);
pg_exec($dbconn1,'create temp table foo as select 'foo' as namecol, 'bar'
as valcol');
Then create a new connection
$dbconn2 = pg_connect('blah blah', , PGSQL_CONNECT_FORCE_NEW);
And query the meta data for table 'foo' in this new connection, it will report the facts
about this table:
pg_meta_data($dbconn2,'foo');
"'Array ( [foo] => Array ( [num] => 1 [type] => varchar... "
However, trying to remove this table:
pg_exec($dbconn,'drop table foo');
Throws an error:
pg_exec(): Query failed: ERROR: table "foo" does not exist in ...
----
Manual Page -- http://www.php.net/manual/en/function.pg-meta-data.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54127
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54127&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54127&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54127&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54127&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54127&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54127&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54127&report=yes
Search -- http://master.php.net/manage/user-notes.php