Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[6.x] Postgresql column precision declaration fix #29873
Now there is no way to create Date/Time column with undefined precision as described in 8.5.1:
For example this code:
will create this sql request:
There is no way to get rid of (0) in a SQL query. Because of 0 as a default value:
In this patch, null precision can be specified.
Full backward compatibility. Since the previous behavior generated an invalid SQL query in this case.
P.S. This is my first pull request. Please correct me if I made a mistake. Thanks.
I'm not sure if this is rightly. Of course, it's really more beautiful. My first variant was (! is_null ...), but it's ugly, so I switched it. But isset... There is an unexpected default value of 0... in other method... It might confuse someone...