Skip to content

Loading…

DBAL-23: PostgreSQL datatypes not recognised (tsvector, _int4, cidr) #1405

Closed
doctrinebot opened this Issue · 5 comments

2 participants

@doctrinebot

Jira issue originally created by user mitchtid:

On reverse engineering one of my PostgreSQL apps, I noticed a few datatypes that weren't recognised in ..

Doctrine/DBAL/Platforms/PostgreSqlPlatform.php

tsvector (treat as string?)
cidr (treat as string?)
_int4 (treat as integer?)

@doctrinebot

Comment created by @beberlei:

Can you link me with information on each of these types?

You can hook them in yourself by using the "registerDoctrineMappingType" method on the Database Platform instance.

@doctrinebot

Comment created by mitchtid:

A bit more digging and I've realised that I should probably just implement these as custom types as they're not particularly portable...

cidr - http://www.postgresql.org/docs/8.4/interactive/datatype-net-types.html
tsvector - http://www.postgresql.org/docs/8.4/interactive/datatype-textsearch.html
_int4 (array of int4s) - http://www.postgresql.org/docs/8.4/interactive/arrays.html

@doctrinebot

Comment created by @beberlei:

Yes custom types are the way to go here.

I actually played a little bit with PostgreSql arrays this week and it seems like an awesome concept, maybe we can integrate them smoothly with an extension some day.

@doctrinebot

Comment created by @beberlei:

See the current Dev Version from more information:

http://github.com/doctrine/dbal-documentation/blob/master/reference/en/types.txt

@doctrinebot

Issue was closed with resolution "Invalid"

@doctrinebot doctrinebot added the Bug label
@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.