New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong type detection in PostgreSQL #163
Comments
Thank you @dg |
WyskyNet
pushed a commit
to trigama/nette-database
that referenced
this issue
Jun 1, 2018
…PostgreSQL [Closes nette#163]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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".
The text was updated successfully, but these errors were encountered: