Skip to content

Size Oracle DATE columns like DATETIME in IPAC-table output - #34

Merged
bjfultn merged 2 commits into
developfrom
fix/oracle-date-width
Oct 27, 2026
Merged

bjfultn merged 2 commits into
developfrom
fix/oracle-date-width

Conversation

@bjfultn

@bjfultn bjfultn commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

With cx_Oracle 8, cursor.description reports Oracle DATE columns as DB_TYPE_DATE. In writeresult.py that matched only the DATE check, which gives a fixed 14-character width. Oracle DATE values carry a time of day, so they format to 19 characters. As a result, every format=ipac query that returns a DATE column fails with HTTP 400:

Column 119 [nightdate], row 0: Formatted value [2024-11-01 00:00:00](14s) -> 20 characters,  overflows column width [14 char].

cx_Oracle 7 reported these columns as DATETIME, which gets 30 characters. This change restores that for Oracle. CSV and VOTable output were unaffected.

Tested on the NEID archive (cx_Oracle 8.3.0): select * ... format=ipac returns 200 again on neidl0, neidl1, neidl2 and neidsolarl2, and nightdate is written as a 30-character column.

🤖 Generated with Claude Code

cx_Oracle 8 reports DATE columns as DB_TYPE_DATE, which matched only the
'DATE' check, so the IPAC writer gave them a fixed 14-character width.
Oracle DATE values include a time of day (YYYY-MM-DD HH:MM:SS), so every
IPAC-format query returning a DATE column failed with "overflows column
width [14 char]".  cx_Oracle 7 reported these as DATETIME (30 characters);
restore that.  CSV and VOTable output were unaffected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@bjfultn
bjfultn merged commit e8b8b72 into develop Oct 27, 2026
6 checks passed
@bjfultn
bjfultn deleted the fix/oracle-date-width branch October 27, 2026 15:58
@bjfultn bjfultn mentioned this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant