|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests |
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 02:00:01 2025 UTC |
Description: ------------ Hi! Is it posible to add support for Composite types and Array- datatypes in Postgres? Now they returned as "strings" and it is hard to parse it. Reproduce code: --------------- Here the example: CREATE TYPE gender AS ENUM ('male', 'female', 'undefined'); CREATE TYPE facebook AS (id bigint, "login" character varying(255), "key" text); CREATE TABLE "user" ( id serial NOT NULL, "login" character varying(127) NOT NULL, "password" character(32) NOT NULL, email character varying(255) NOT NULL, gender gender NOT NULL DEFAULT 'undefined'::gender, facebook facebook, CONSTRAINT user_pkey PRIMARY KEY (id) ) WITH ( OIDS=FALSE ); >> select id, password, email, facebook, gender from "user"; id | password | email | facebook | gender ----+----------------------------------+----------------+-----------------------+-------- 1 | 123 | test@test.com | (1,josser,"long key") | male Expected result: ---------------- I think it will be very helpful if the facebook type will be represented as OBJ or as ARRAY (FETCH_OBJ/FETCH_ASSOC?). Thanks! Sorry about my bad english. Actual result: -------------- Currently they are represented as strings which is hard to parse.