<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=MDB2_Driver_pgsql</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/21047" />
      <rdf:li rdf:resource="http://pear.php.net/bug/19974" />
      <rdf:li rdf:resource="http://pear.php.net/bug/18488" />
      <rdf:li rdf:resource="http://pear.php.net/bug/17198" />
      <rdf:li rdf:resource="http://pear.php.net/bug/11802" />
      <rdf:li rdf:resource="http://pear.php.net/bug/7059" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/21047">
      <title>MDB2_Driver_pgsql: Feature/Change Request 21047 [Open] Datatype ($db_type) interval missing</title>
      <link>http://pear.php.net/bugs/21047</link>
      <content:encoded><![CDATA[<pre>MDB2_Driver_pgsql Feature/Change Request
Reported by jugantner
2016-03-31T19:08:51+00:00
PHP: Irrelevant OS: independant Package Version: 1.5.0b4

Description:
------------
In file MDB2/Driver/Datatype/pgsql.php in function _mapNativeDatatype (row 411ff) the type &quot;interval&quot; is missing. Its a timestamp-timestamp datatype in postgres.

It would be nice to include this datatype to the next release.

Are there any release plans?
If no, how can I help?

Expected result:
----------------
datatype ($db_type) &quot;interval&quot; can be processed

Actual result:
--------------
datatype &quot;interval&quot; is unknown and thus a resultset cannot be analysed with the Reverse module if a column has datatype &quot;interval&quot;.</pre>]]></content:encoded>
      <description><![CDATA[<pre>MDB2_Driver_pgsql Feature/Change Request
Reported by jugantner
2016-03-31T19:08:51+00:00
PHP: Irrelevant OS: independant Package Version: 1.5.0b4

Description:
------------
In file MDB2/Driver/Datatype/pgsql.php in function _mapNativeDatatype (row 411ff) the type &quot;interval&quot; is missing. Its a timestamp-timestamp datatype in postgres.

It would be nice to include this datatype to the next release.

Are there any release plans?
If no, how can I help?

Expected result:
----------------
datatype ($db_type) &quot;interval&quot; can be processed

Actual result:
--------------
datatype &quot;interval&quot; is unknown and thus a resultset cannot be analysed with the Reverse module if a column has datatype &quot;interval&quot;.</pre>]]></description>
      <dc:date>2016-03-31T19:08:51+00:00</dc:date>
      <dc:creator>kontakt &amp;#x61;&amp;#116; itloesungen &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>MDB2_Driver_pgsql Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/19974">
      <title>MDB2_Driver_pgsql: Bug 19974 [Open] Bug in named placeholder parameter substitution in prepare()</title>
      <link>http://pear.php.net/bugs/19974</link>
      <content:encoded><![CDATA[<pre>MDB2_Driver_pgsql Bug
Reported by gacek
2013-06-11T15:50:04+00:00
PHP: Irrelevant OS:  Package Version: 1.5.0b4

Description:
------------
When using named placeholders (with option emulate_prepared==false),
prepare() function misplaces them due to wrong $parameter counter usage.




Test script:
---------------
Try such SQL statement (transcription):

$result=query_row('SELECT CAST(:p1 AS TEXT) AS r1, CAST(:p2 AS TEXT) AS r2, CAST(:p1 AS TEXT) AS r3, CAST(:p3 AS TEXT) AS r4',
  array(                                                                                                      
    'p1'=&gt;'v1',
    'p2'=&gt;'v2',
    'p3'=&gt;'v3'
  )
)                 




Expected result:
----------------
array(
  'r1'=&gt;'v1',
  'r2'=&gt;'v2',
  'r3'=&gt;'v1',
  'r4'=&gt;'v3'
)

Actual result:
--------------
From postgresql.log: 
EXECUTE db2_statement_pgsql_2878e7cd3a2411850038698262023349030b5e903 ('v1', 'v2', 'v3')
DETAIL:  prepare: SELECT CAST($1 AS TEXT) AS r1, CAST($2 AS TEXT) AS r2, CAST($1 AS TEXT) AS r3, CAST($2 AS TEXT) AS r4

ERROR:  wrong number of parameters for prepared statement &quot;mdb2_statement_pgsql_208664a2f39741a37ff1c60380c0430d162a1ac36&quot;, Expected 2 parameters but got 3</pre>]]></content:encoded>
      <description><![CDATA[<pre>MDB2_Driver_pgsql Bug
Reported by gacek
2013-06-11T15:50:04+00:00
PHP: Irrelevant OS:  Package Version: 1.5.0b4

Description:
------------
When using named placeholders (with option emulate_prepared==false),
prepare() function misplaces them due to wrong $parameter counter usage.




Test script:
---------------
Try such SQL statement (transcription):

$result=query_row('SELECT CAST(:p1 AS TEXT) AS r1, CAST(:p2 AS TEXT) AS r2, CAST(:p1 AS TEXT) AS r3, CAST(:p3 AS TEXT) AS r4',
  array(                                                                                                      
    'p1'=&gt;'v1',
    'p2'=&gt;'v2',
    'p3'=&gt;'v3'
  )
)                 




Expected result:
----------------
array(
  'r1'=&gt;'v1',
  'r2'=&gt;'v2',
  'r3'=&gt;'v1',
  'r4'=&gt;'v3'
)

Actual result:
--------------
From postgresql.log: 
EXECUTE db2_statement_pgsql_2878e7cd3a2411850038698262023349030b5e903 ('v1', 'v2', 'v3')
DETAIL:  prepare: SELECT CAST($1 AS TEXT) AS r1, CAST($2 AS TEXT) AS r2, CAST($1 AS TEXT) AS r3, CAST($2 AS TEXT) AS r4

ERROR:  wrong number of parameters for prepared statement &quot;mdb2_statement_pgsql_208664a2f39741a37ff1c60380c0430d162a1ac36&quot;, Expected 2 parameters but got 3</pre>]]></description>
      <dc:date>2013-06-11T15:50:04+00:00</dc:date>
      <dc:creator>gacek &amp;#x61;&amp;#116; intertele &amp;#x64;&amp;#111;&amp;#x74; pl</dc:creator>
      <dc:subject>MDB2_Driver_pgsql Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/18488">
      <title>MDB2_Driver_pgsql: Bug 18488 [Open] tableInfo doesn't return flags</title>
      <link>http://pear.php.net/bugs/18488</link>
      <content:encoded><![CDATA[<pre>MDB2_Driver_pgsql Bug
Reported by kurtjos
2011-04-29T15:36:54+00:00
PHP: 5.3.1 OS: linux mint 10 Package Version: 1.5.0b3

Description:
------------
my phpinfo says:
PHP Version 5.3.3-1ubuntu9.3

postgresql version: 8.4.8

the table in question partial output from phppgsql:
Column    Type      Not Null  Default        Constraints
companyid integer   NOT NULL                 [pk]       

it has a default value of: 
nextval(('&quot;company_companyid_seq&quot;'::text)::regclass)


Test script:
---------------
function loadFields($table_name){
     global $mdb2;
     $tableinfo = array();
     
     $q    = &quot;SELECT * FROM &quot;.$table_name.&quot; LIMIT 1&quot;;
     $res  = $mdb2-&gt;query($q);
     $row  = $res-&gt;fetchRow();
     $cols = $res-&gt;getColumnNames(FLIP);
     
     $mdb2-&gt;loadModule('Extended');
     $mdb2-&gt;loadModule('Manager');
     
     $tableinfo = $mdb2-&gt;tableInfo($res,NULL);
     print_r(&quot;tableInfo: \n&quot;);      // my debug info
     print_r($tableinfo);           // my debug info
     
     return $cols;
}

Expected result:
----------------
tableInfo: 
Array
(
    [0] =&gt; Array
        (
            [table] =&gt; company
            [name] =&gt; companyid
            [type] =&gt; int4
            [length] =&gt; 4
            [flags] =&gt; not_null primary_key
            [mdb2type] =&gt; integer
        )


Actual result:
--------------
tableInfo: 
Array
(
    [0] =&gt; Array
        (
            [table] =&gt; company
            [name] =&gt; companyid
            [type] =&gt; int4
            [length] =&gt; 4
            [flags] =&gt; 
            [mdb2type] =&gt; integer
        )</pre>]]></content:encoded>
      <description><![CDATA[<pre>MDB2_Driver_pgsql Bug
Reported by kurtjos
2011-04-29T15:36:54+00:00
PHP: 5.3.1 OS: linux mint 10 Package Version: 1.5.0b3

Description:
------------
my phpinfo says:
PHP Version 5.3.3-1ubuntu9.3

postgresql version: 8.4.8

the table in question partial output from phppgsql:
Column    Type      Not Null  Default        Constraints
companyid integer   NOT NULL                 [pk]       

it has a default value of: 
nextval(('&quot;company_companyid_seq&quot;'::text)::regclass)


Test script:
---------------
function loadFields($table_name){
     global $mdb2;
     $tableinfo = array();
     
     $q    = &quot;SELECT * FROM &quot;.$table_name.&quot; LIMIT 1&quot;;
     $res  = $mdb2-&gt;query($q);
     $row  = $res-&gt;fetchRow();
     $cols = $res-&gt;getColumnNames(FLIP);
     
     $mdb2-&gt;loadModule('Extended');
     $mdb2-&gt;loadModule('Manager');
     
     $tableinfo = $mdb2-&gt;tableInfo($res,NULL);
     print_r(&quot;tableInfo: \n&quot;);      // my debug info
     print_r($tableinfo);           // my debug info
     
     return $cols;
}

Expected result:
----------------
tableInfo: 
Array
(
    [0] =&gt; Array
        (
            [table] =&gt; company
            [name] =&gt; companyid
            [type] =&gt; int4
            [length] =&gt; 4
            [flags] =&gt; not_null primary_key
            [mdb2type] =&gt; integer
        )


Actual result:
--------------
tableInfo: 
Array
(
    [0] =&gt; Array
        (
            [table] =&gt; company
            [name] =&gt; companyid
            [type] =&gt; int4
            [length] =&gt; 4
            [flags] =&gt; 
            [mdb2type] =&gt; integer
        )</pre>]]></description>
      <dc:date>2011-04-29T15:36:54+00:00</dc:date>
      <dc:creator>kurtjos &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>MDB2_Driver_pgsql Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/17198">
      <title>MDB2_Driver_pgsql: Bug 17198 [Open] Loosing db-session properties after disconnect</title>
      <link>http://pear.php.net/bugs/17198</link>
      <content:encoded><![CDATA[<pre>MDB2_Driver_pgsql Bug
Reported by felix_ant
2010-03-05T21:15:11+00:00
PHP: 5.2.5 OS: 1.4.1 Package Version: 1.4.1

Description:
------------
We are working with Postgresql and using several connections. Always that we make a connection, we change some vars of the db-session (datestyle, client_encoding, ...). The problem appears when we disconnect one of them;  then , the rest of the connections loose the db-sessions var that we fixed previously.

We don't want to use &quot;persistence connections&quot;, and we have read that the php-core optimizes no-persistence connections using the same instance with the same connection string. But we don't know why when you disconnect one of them, you are changing session enviroment of the rest.

It could be a bug or, is a mistake of ourselves?

Test script:
---------------
&lt;?php
/**
 * test disconnect
 *
 * @package gvHIDRA
 * 
 */
include_once('MDB2.php');

$dsn = array(
			'phptype'  =&gt; 'pgsql',
			'username' =&gt; 'xxxx',
			'password' =&gt; 'xxxx',
			'hostspec' =&gt; 'rosa.coput.gva.es',
			'database' =&gt; 'marte',
		);
		
$options = array(
    		'portability' =&gt; MDB2_PORTABILITY_NONE,
		);
$changeDateStyle = 'set session datestyle = \'sql, european\'';

$query = &lt;&lt;&lt;query
SELECT
	date1 
FROM
	example 
LIMIT 1
query;


//First connection
$con1 = MDB2::connect($dsn,$options);
if (PEAR::isError($con1))
	throw new Exception('Error connecting...');
$result = $con1-&gt;exec($changeDateStyle);
if (PEAR::isError($result))
	throw new Exception('Error setting datestyle...');		

//Second connection
$con2 = MDB2::connect($dsn,$options);
if (PEAR::isError($con2))
	throw new Exception('Error connecting...');    
$result = $con2-&gt;exec($changeDateStyle);
if (PEAR::isError($result))
	throw new Exception('Error setting datestyle...');


//Query with connect1
$resc1 = $con1-&gt;query($query);
if (PEAR::isError($resc1)){
	throw new Exception('Error launching query...');
}
$result1 = $resc1-&gt;fetchAll();
echo &quot;Result with 1st connection\n&quot;;
print_r($result1);
$con1-&gt;disconnect();	

//Query with connect2
$resc2 = $con2-&gt;query($query);
if (PEAR::isError($resc2)){
	throw new Exception('Error launching query...');
}
$result2 = $resc2-&gt;fetchAll();
echo &quot;\nResult with 2on connection\n&quot;;
print_r($result2);
$con2-&gt;disconnect();	

?&gt;

Expected result:
----------------
Result with 1st connection
Array
(
    [0] =&gt; Array
        (
            [0] =&gt; 01/01/2003
        )

)

Result with 2on connection
Array
(
    [0] =&gt; Array
        (
            [0] =&gt; 01/01/2003
        )

)


Actual result:
--------------
Result with 1st connection
Array
(
    [0] =&gt; Array
        (
            [0] =&gt; 01/01/2003
        )

)

Result with 2on connection
Array
(
    [0] =&gt; Array
        (
            [0] =&gt; 2003-01-01
        )

)</pre>]]></content:encoded>
      <description><![CDATA[<pre>MDB2_Driver_pgsql Bug
Reported by felix_ant
2010-03-05T21:15:11+00:00
PHP: 5.2.5 OS: 1.4.1 Package Version: 1.4.1

Description:
------------
We are working with Postgresql and using several connections. Always that we make a connection, we change some vars of the db-session (datestyle, client_encoding, ...). The problem appears when we disconnect one of them;  then , the rest of the connections loose the db-sessions var that we fixed previously.

We don't want to use &quot;persistence connections&quot;, and we have read that the php-core optimizes no-persistence connections using the same instance with the same connection string. But we don't know why when you disconnect one of them, you are changing session enviroment of the rest.

It could be a bug or, is a mistake of ourselves?

Test script:
---------------
&lt;?php
/**
 * test disconnect
 *
 * @package gvHIDRA
 * 
 */
include_once('MDB2.php');

$dsn = array(
			'phptype'  =&gt; 'pgsql',
			'username' =&gt; 'xxxx',
			'password' =&gt; 'xxxx',
			'hostspec' =&gt; 'rosa.coput.gva.es',
			'database' =&gt; 'marte',
		);
		
$options = array(
    		'portability' =&gt; MDB2_PORTABILITY_NONE,
		);
$changeDateStyle = 'set session datestyle = \'sql, european\'';

$query = &lt;&lt;&lt;query
SELECT
	date1 
FROM
	example 
LIMIT 1
query;


//First connection
$con1 = MDB2::connect($dsn,$options);
if (PEAR::isError($con1))
	throw new Exception('Error connecting...');
$result = $con1-&gt;exec($changeDateStyle);
if (PEAR::isError($result))
	throw new Exception('Error setting datestyle...');		

//Second connection
$con2 = MDB2::connect($dsn,$options);
if (PEAR::isError($con2))
	throw new Exception('Error connecting...');    
$result = $con2-&gt;exec($changeDateStyle);
if (PEAR::isError($result))
	throw new Exception('Error setting datestyle...');


//Query with connect1
$resc1 = $con1-&gt;query($query);
if (PEAR::isError($resc1)){
	throw new Exception('Error launching query...');
}
$result1 = $resc1-&gt;fetchAll();
echo &quot;Result with 1st connection\n&quot;;
print_r($result1);
$con1-&gt;disconnect();	

//Query with connect2
$resc2 = $con2-&gt;query($query);
if (PEAR::isError($resc2)){
	throw new Exception('Error launching query...');
}
$result2 = $resc2-&gt;fetchAll();
echo &quot;\nResult with 2on connection\n&quot;;
print_r($result2);
$con2-&gt;disconnect();	

?&gt;

Expected result:
----------------
Result with 1st connection
Array
(
    [0] =&gt; Array
        (
            [0] =&gt; 01/01/2003
        )

)

Result with 2on connection
Array
(
    [0] =&gt; Array
        (
            [0] =&gt; 01/01/2003
        )

)


Actual result:
--------------
Result with 1st connection
Array
(
    [0] =&gt; Array
        (
            [0] =&gt; 01/01/2003
        )

)

Result with 2on connection
Array
(
    [0] =&gt; Array
        (
            [0] =&gt; 2003-01-01
        )

)</pre>]]></description>
      <dc:date>2010-03-08T14:41:54+00:00</dc:date>
      <dc:creator>felix_ant &amp;#x61;&amp;#116; gva &amp;#x64;&amp;#111;&amp;#x74; es</dc:creator>
      <dc:subject>MDB2_Driver_pgsql Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/11802">
      <title>MDB2_Driver_pgsql: Feature/Change Request 11802 [Open] Methods to check connection status and busy</title>
      <link>http://pear.php.net/bugs/11802</link>
      <content:encoded><![CDATA[<pre>MDB2_Driver_pgsql Feature/Change Request
Reported by pberry
2007-08-09T01:27:51+00:00
PHP: Irrelevant OS: N/A Package Version: 1.4.1

Description:
------------
Neither the driver or MDB2 contains a way to manually 
check if a connection is still active and whether or not 
it's busy.

Two methods that I've added to MDB2_Driver_pgsql are 
connectionIsBusy() and pingConnection(), it would be nice 
if these or something similar could be rolled into main.

Test script:
---------------
function connectionIsBusy(){
   if(pg_connection_busy($this-&gt;connection)){
        return TRUE ;
   }
}

function pingConnection(){
 if(pg_connection_status($this-&gt;connection) === PGSQL_CONNECTION_OK){
     return TRUE ;
  }
}</pre>]]></content:encoded>
      <description><![CDATA[<pre>MDB2_Driver_pgsql Feature/Change Request
Reported by pberry
2007-08-09T01:27:51+00:00
PHP: Irrelevant OS: N/A Package Version: 1.4.1

Description:
------------
Neither the driver or MDB2 contains a way to manually 
check if a connection is still active and whether or not 
it's busy.

Two methods that I've added to MDB2_Driver_pgsql are 
connectionIsBusy() and pingConnection(), it would be nice 
if these or something similar could be rolled into main.

Test script:
---------------
function connectionIsBusy(){
   if(pg_connection_busy($this-&gt;connection)){
        return TRUE ;
   }
}

function pingConnection(){
 if(pg_connection_status($this-&gt;connection) === PGSQL_CONNECTION_OK){
     return TRUE ;
  }
}</pre>]]></description>
      <dc:date>2007-08-09T01:27:51+00:00</dc:date>
      <dc:creator>pberry &amp;#x61;&amp;#116; stellaconcepts &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>MDB2_Driver_pgsql Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/7059">
      <title>MDB2_Driver_pgsql: Feature/Change Request 7059 [Open] pgsql error code mapping cannot handle localized error messages</title>
      <link>http://pear.php.net/bugs/7059</link>
      <content:encoded><![CDATA[<pre>MDB2_Driver_pgsql Feature/Change Request
Reported by sacher@...
2006-03-08T10:39:04+00:00
PHP: 5.0.4 OS: Linux SuSE10.0 i386 Package Version: 

Description:
------------
The documentation says that a sequence will automatically  be created on nextID(.., true). 

nextID returns a DB_Error like this:
DB Error: unknown error 
-1
SELECT NEXTVAL('test_seq') [nativecode=FEHLER:  Relation ÃÂ»test_seqÃÂ« existiert nicht]
(relation does not exist)

Reason seems to be the return code of the used PostgreSQL which is not the one expected by nextID().

If uncomment the condition in 
DB/pqsql.php Line 681 $result-&gt;getCode() == DB_ERROR_NOSUCHTABLE
everything works fine.

Used db is PostgreSQL 7.4.8</pre>]]></content:encoded>
      <description><![CDATA[<pre>MDB2_Driver_pgsql Feature/Change Request
Reported by sacher@...
2006-03-08T10:39:04+00:00
PHP: 5.0.4 OS: Linux SuSE10.0 i386 Package Version: 

Description:
------------
The documentation says that a sequence will automatically  be created on nextID(.., true). 

nextID returns a DB_Error like this:
DB Error: unknown error 
-1
SELECT NEXTVAL('test_seq') [nativecode=FEHLER:  Relation ÃÂ»test_seqÃÂ« existiert nicht]
(relation does not exist)

Reason seems to be the return code of the used PostgreSQL which is not the one expected by nextID().

If uncomment the condition in 
DB/pqsql.php Line 681 $result-&gt;getCode() == DB_ERROR_NOSUCHTABLE
everything works fine.

Used db is PostgreSQL 7.4.8</pre>]]></description>
      <dc:date>2006-03-12T09:13:56+00:00</dc:date>
      <dc:creator>sacher &amp;#x61;&amp;#116; manetmail &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>MDB2_Driver_pgsql Feature/Change Request</dc:subject>
    </item>
</rdf:RDF>
