-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
SYSDATE Considered Identifier when used in inner select #3394
Comments
Normally you should use H2 should probably reject |
Hypothetically this issue can be fixed in a simpler way by preparation of inner query before reading of its execution plan for temporary view. |
Hi @katzyn I forgot to mention that indeed i am interested in using Oracle Compatibility Mode, as I am planing on using H2 for some Integration tests/ =fast Development Database, so changing the Thank you very much for you replay and PR. I checked my specific usecase against the code that you are propsing in there an it indeed fixes my problem. Waiting for it to get included in an offictial h2 release! |
- http://www.h2database.com/html/changelog.html - h2database/h2database#3394 버전업 후, 테이블 생성 컬럼기본값으로 SYSDATE를 사용할때, 이것을 식별자로 간주되서 테이블 생성이 실패하는 현상이 있었는데, 이번 버전부터는 Oracle 호환성 모드를 설정하지 않는 이상 CURRENT_TIMESTAMP 또는 LOCALTIMESTAMP를 써야한다고 한다. Oracle 호환 모드를 켜진 말고, CURRENT_TIMESTAMP 으로 바꾸자! 그리고 h2의 버전업은 인스톨러를 통해 재설치하지 않고, jar만 교체했다. 재설치할 필요없는 듯...😄😄😄
Hi all,
I've been playing around with h2 v2.1.210 and observed quite an odd behaviour when having SYSDATE Keyword inside an inner select
Running
SELECT SYSDATE FROM DUAL
is going to work without any issues, but using sysdate inside an inner select is going to throw an error, because it seems like sysdate is expected to be an identifier.SELECT * FROM (SELECT SYSDATE FROM DUAL)
returnsColumn "SYSDATE" not found; SQL statement: CREATE FORCE VIEW ( SELECT "SYSDATE" ) AS SELECT "SYSDATE" [42122-210]
The text was updated successfully, but these errors were encountered: