Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-23

PostgreSQL datatypes not recognised (tsvector, _int4, cidr)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Invalid
    • Affects Version/s: 2.0.0-BETA2
    • Fix Version/s: None
    • Component/s: Platforms
    • Labels:
      None
    • Environment:
      PostgreSQL 8.4.x

      Description

      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?)

        Activity

        Hide
        Benjamin Eberlei added a comment -

        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.

        Show
        Benjamin Eberlei added a comment - 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.
        Hide
        Mark Mitchenall added a comment -

        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

        Show
        Mark Mitchenall added a comment - 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
        Hide
        Benjamin Eberlei added a comment -

        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.

        Show
        Benjamin Eberlei added a comment - 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.
        Hide
        Benjamin Eberlei added a comment -
        Show
        Benjamin Eberlei added a comment - See the current Dev Version from more information: http://github.com/doctrine/dbal-documentation/blob/master/reference/en/types.txt

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Mark Mitchenall
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: