Req #41241 [Ana->Asn]: Realization array type. SQL 2003, S091

From: Date: Tue, 24 Oct 2017 03:06:00 +0000
Subject: Req #41241 [Ana->Asn]: Realization array type. SQL 2003, S091
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211885@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=41241&edit=1

 ID:                 41241
 Updated by:         kalle@php.net
 Reported by:        develar at gmail dot com
 Summary:            Realization array type. SQL 2003, S091
-Status:             Analyzed
+Status:             Assigned
 Type:               Feature/Change Request
 Package:            PostgreSQL related
 Operating System:   *
 PHP Version:        *
 Assigned To:        yohgaki
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2013-06-29 03:54:00] yohgaki@php.net

Multibyte support is mandatory to implement correctly.

This feature won't be implemented until PHP has default multibyte string 
functions.

------------------------------------------------------------------------
[2012-03-31 05:35:36] yohgaki@php.net

Changing return value may break applications. I may implement 

pg_array(mixed $var);

when $var is string, convert to array.
when $var is array, convert to string for query.

------------------------------------------------------------------------
[2007-04-30 16:03:10] tony2001@php.net

Reclassified as feature request.

------------------------------------------------------------------------
[2007-04-30 14:31:05] develar at gmail dot com

<?php

$Pdo = new PDO('pgsql:host=localhost port=5432 dbname=postgres user=postgres
password=password');
var_export($Pdo->query('select proargnames from pg_catalog.pg_proc order by proargnames
limit 1')->fetchAll(PDO::FETCH_ASSOC));

?>

actual:

array (
  0 => 
  array (
    'proargnames' => '{"",x,n}',
  ),
)

expected:

proargnames is array, but not string

array (
  0 => 
  array (
    'proargnames' => 
    array (
      0 => '',
      1 => 'x',
      2 => 'n',
    ),
  ),
)

------------------------------------------------------------------------
[2007-04-30 13:20:08] develar at gmail dot com

Pdo (pdo_pgsql) supports SQL 2003 T031 - BOOLEAN data type. If I select value of a field, it will be
returned with type BOOL.

I ask, that also was supported SQL 2003 S091 - ARRAY data type. If I select proargnames with type
text[], I expect, that PDO will return to me array, instead of string.

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


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

    https://bugs.php.net/bug.php?id=41241


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


Thread (10 messages)

« previous php.bugs (#211885) next »