-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: support more values for DateStyle
session parameter
#41773
Comments
As another data point for this issue, we are attempting to use Oracle Golden Gate replication to move data from an existing Oracle DB to CockroachDB. OGG uses the Progress ODBC driver which appears to issue a |
we can't even pass datestyle as connection variable.
|
@rafiss Can we revisit this for the May milestone? |
I hope that we can get started on it, but this will have the same complexities as described in #62313 (review) -- will need a potentially big refactor/new interfaces. |
I started working on a library to work across all styles (ISO,Postgres,SQL,German), but it turns out we only need the order components {MDY,YMD,DMY} to work maintaining the ISO style. That's a lot simpler, I'll be doing that instead. If anyone wants to embark on this for future work, I've started that work here https://github.com/cockroachdb/pgdatetime. I have basically attempted to copy Postgres's parse logic, I have the tokens, formatting and some parsing logic working. But there are many road bumps to go:
|
68093: sql: allow YMD, DMY for DateStyle as a session variable r=rafiss a=otan Refs: #41773 See individual commits for details. 68289: colexec: fix LIKE operators when patterns have escape characters r=yuzefovich a=yuzefovich **colexec: fix LIKE operators when patterns have escape characters** Fixes: #68040. Release note (bug fix): Previously, CockroachDB could incorrectly evaluate LIKE expressions when the pattern contained the escape characters `\` if the expressions were executed via the vectorized engine. **colbuilder: force planning of optimized projection operators** Whenever we're planning a projection expression, we have 3 cases: the left is constant, the right is constants, and neither are constants. For the second case we have some optimized operators. Previously, those operators weren't exercised via the TestEval/vectorized because in the eval tests the left side is constant. This commit switches the planning to force planning of those optimized operators. This shouldn't really have an effect on planning of actual queries. This was prompted by the bug in LIKE operators that is fixed in the previous commit. Had we forced the planning for our eval tests, we would have caught it earlier. This also revealed an incompatibility for our IN operator implementation when the right side is an empty tuple which this commit also fixes. However, I don't think this scenario can be hit in production because the optimizer folds such an expression into correct `false`. Thus, there is no release note. Release note: None Co-authored-by: Oliver Tan <[email protected]> Co-authored-by: Yahor Yuzefovich <[email protected]>
Support for ISO / MDY,DMY,YMD is complete. |
heads up stuff like
|
full docs: https://www.postgresql.org/docs/9.5/runtime-config-client.html#GUC-DATESTYLE
Epic CRDB-2508
Jira issue: CRDB-6339
The text was updated successfully, but these errors were encountered: