News for hackers. Stuff that matters.
Re:Problems with Oracle SQL by vbezhenar on Friday September 10, 2021 @12:45PM (#28484067)
One of oracle quirks for me is varchar2. What happened to varchar1? Nobody knows.
Re:Problems with Oracle SQL by tgv on Friday September 10, 2021 @12:47PM (#28484100)
TIMESTAMP WITH LOCAL TIMEZONE. Never again.
Re:Problems with Oracle SQL by beamatronic on Friday September 10, 2021 @12:59PM (#28484310)
Let me guess, did you get hit with more than one 3:00am?
Re:Problems with Oracle SQL by tmd83 on Friday September 10, 2021 @01:07PM (#28484419)
Let's not forget that Oracle DB uses the system timezone as the datatype storage (not sure what other database do to be honest) so unless you were running your DB machine as UTC by default their timestamp storage would be ambiguous for DST shift and that's their default. Why wouldn't they store everything in UTC and use the system timezone for parse/formatting I have no clue.
Re:Problems with Oracle SQL by tracker1 on Friday September 10, 2021 @02:55PM (#28485680)
I've been pushing to run ALL servers as UTC for a few decades now... always store/transmit date+time as UTC as well. If it's mapped to a locale, pair it with that locale... let the client translate to/from local.
Re:Problems with Oracle SQL by SketchySeaBeast on Friday September 10, 2021 @12:57PM (#28484266)
Oh sorry, are you looking to insert 4001 characters in your varchar2? Buckle up kids, things are gonna get rough.
Re:Problems with Oracle SQL by kubanczyk on Friday September 10, 2021 @03:33PM (#28486036)
Or maybe 3999 chars, of which a couple are two-byte. More fun.
Re:Problems with Oracle SQL by gvenzl on Friday September 10, 2021 @06:29PM (#28487615)
Oracle supports up to 32k VARCHARs since 12.1 released back in 2013.

It just needs to be enabled: https://docs.oracle.com/database/121/REFRN/GUID-D424D23B-093...

Re:Problems with Oracle SQL by icedchai on Friday September 10, 2021 @02:16PM (#28485233)
varchar1 was varchar. I should say "is", since varchar is still supported, they just recommend varchar2 since varchar "might change" (probably not...)
Re:Problems with Oracle SQL by marcosdumay on Friday September 10, 2021 @09:27PM (#28488672)
That one actually changed already. If you follow the new recommendations, varchar is as good as varchar2.
Re:Problems with Oracle SQL by icedchai on Saturday September 11, 2021 @07:50PM (#28497213)
Good to know! I haven't had to touch an Oracle database in almost 15 years, but one never knows.