Skip to content

Wrong type detection in PostgreSQL #163

Description

@dohnal
  • bug report? yes
  • feature request? no
  • version: v2.4.1

Description

Data type detection does not accept all postgres supported timestamp types as "time" types. Here, postgres type "TIMESTAMP WITH TIME ZONE" is interpreted as string.

Steps To Reproduce

Create a table with two columns "TIMESTAMP" and "TIMESTAMP WITH TIME ZONE". Insert a record and compare the results in ActiveRow object -- the first column will be OK, the second will be string.

Fix is simple -- update Helpers.php as follows:
Changing the $typePatterns array on line with '(SMALL)?DATETIME(OFFSET)?\d*|TIME(STAMP)?' by adding .* after "STAMP".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions