Skip to content

Apply real, double precision and boolean column defaults when creating a table - #8794

Merged
andypalmi merged 1 commit into
mainfrom
fix/tables-column-defaults
Oct 6, 2026
Merged

andypalmi merged 1 commit into
mainfrom
fix/tables-column-defaults

Conversation

@andypalmi

Copy link
Copy Markdown
Contributor

Closes #8793

Both Postgres drivers built the DEFAULT clause for real, double precision and boolean columns from column.default, where column is the SQL string being built. They now read col.default like the other types.

  1. A real or double precision default no longer fails the create with "cannot use column reference in DEFAULT expression".
  2. A boolean default of true is no longer created as false.

Each driver spec has a new test for these three types, which fails without the fix.

…g a table

The Postgres drivers read the default for these column types from the SQL string being built instead of the column definition. A real or double precision default failed the create with DEFAULT NaN, and a boolean default was always false.
@andypalmi andypalmi assigned Steve-Mcl and hardillb and unassigned hardillb and Steve-Mcl Oct 5, 2026
@andypalmi
andypalmi marked this pull request as ready for review October 5, 2026 17:04

@Steve-Mcl Steve-Mcl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Awaiting tests before merge.

@codecov

codecov Bot commented Oct 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@bfaaa30). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8794   +/-   ##
=======================================
  Coverage        ?   78.37%           
=======================================
  Files           ?      474           
  Lines           ?    25639           
  Branches        ?     6827           
=======================================
  Hits            ?    20095           
  Misses          ?     5544           
  Partials        ?        0           
Flag Coverage Δ
backend 78.37% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andypalmi
andypalmi requested a review from Steve-Mcl October 5, 2026 21:05
@andypalmi
andypalmi enabled auto-merge (squash) October 6, 2026 08:28
@hardillb

hardillb commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

@Steve-Mcl did you mean to mark this as approved not just leave a comment?

@andypalmi
andypalmi merged commit fe8786f into main Oct 6, 2026
29 checks passed
@andypalmi
andypalmi deleted the fix/tables-column-defaults branch October 6, 2026 09:37

This branch was successfully deployed

1 active deployment
staging — 1a61a6d0 Deployed Oct 6, 2026 by andypalmi via Remove application #12177
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.

FF Tables: column defaults on real, double precision and boolean columns are built from the wrong variable

3 participants