Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Fix trailing spaces in Temporal Dates day_name field#5

Open
sergio-bershadsky wants to merge 1 commit into
ftp-mainfrom
797-fix-temporal-dates-day-name-trailing-spaces
Open

Fix trailing spaces in Temporal Dates day_name field#5
sergio-bershadsky wants to merge 1 commit into
ftp-mainfrom
797-fix-temporal-dates-day-name-trailing-spaces

Conversation

@sergio-bershadsky
Copy link
Copy Markdown

Summary

  • PostgreSQL's TO_CHAR(date, 'Day') right-pads day names to 9 chars (length of "Wednesday"), causing trailing spaces in day_name for all days except Wednesday
  • Wrap with TRIM() to produce clean day names
  • Fixes 625/730 rows in tabTemporal Dates that had trailing spaces, which could break joins with tabDelivery Day

Test plan

  • Deploy to staging and run "Rebuild Temporal Dates" from Temporal Manager
  • Verify SELECT DISTINCT day_name, LENGTH(day_name) FROM "tabTemporal Dates" shows no padding
  • Verify delivery date lookups (joins with tabDelivery Day) work correctly

Closes Farm-To-People/app_ftp#797

🤖 Generated with Claude Code

PostgreSQL's TO_CHAR(date, 'Day') right-pads day names to 9 characters
(the length of "Wednesday"). This caused 625/730 rows to have trailing
spaces in day_name, breaking joins with tabDelivery Day.

Closes Farm-To-People/app_ftp#797

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants