PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » MDB2_Driver_pgsql » Bug #7731

PostgreSQL - alterTable

Details

Submitted2006-05-26 10:12 UTC
Fromdecombe at unisolution dot de
Assignedlsmith
StatusClosed
PackageMDB2_Driver_pgsql
PHP Version4.3.10
OSSuse 9.3
Roadmaps(Not assigned)

Comments

[2006-05-26 10:12 UTC] decombe at unisolution dot de

Description:
------------
I wanted to use MDB2 to modify a Columnsize in my Database PostgreSQL. I use the function alterTable. PostgreSQL give back a error because the Query is false.

MDB2 2.0.3 stable
MDB2_Driver_mysql 1.0.3 stable
MDB2_Driver_pgsql 1.0.3 stable
MDB2_Schema 0.5.0 beta

Test script:
---------------
$table = 'data_users';
$change = Array ( [change] => Array ( [user_version] => Array ( [type] => text [definition] => Array ( [type] => text [length] => 10 ) ) ) ) ;

$this->manager->alterTable($table, $change, false);

Actual result:
--------------
_doQuery: Could not execute statement[Native message: ERROR: parser: parse error at or near "TYPE" at character 43 ] mdb2_error Object ( [error_message_prefix] => [mode] => 1 [level] => 1024 [code] => -2

Query - ALTER TABLE data_users ALTER user_version TYPE VARCHAR(10)

[2006-05-26 10:32 UTC] decombe at unisolution dot de

I use PostgreSQL 7.3.4

[2006-05-26 10:41 UTC] decombe at unisolution dot de

Ok. what do you mean exactly ? Will you modify the function for the code to work with my version of PostgreSQL or do you only write a meaningful error ?

For which dedicated version of Pgsql are you developping the functions ?