You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Default values are ignored in FILESTORAGE and LOCALSTORAGE #1848
Noticing default values set during INSERT operations in tables (banks, pigs) where specified defaults exist, they are correctly applied. However, columns without explicitly provided values during retrieval display as 'undefined', which aligns with expectations as no default values were specified for those columns.
Additionally, updated the FOREIGN KEY reference from bank(name) to banks(name) for accuracy.
This issue might be similar to #1985, related to the treatment of missing keys in data passed in through parameters (?s).
Any prior art here? Or has this been discussed before? One approach might be to add support in AlaSQL to infer the schema of data passed via parameters, so that it can handle these cases gracefully. It seems natural for AlaSQL to do this, though some care may be needed to make the transition backwards compatible.
Activity
jigarBorde commentedon Dec 30, 2023
Hii @mathiasrw
Noticing default values set during INSERT operations in tables (banks, pigs) where specified defaults exist, they are correctly applied. However, columns without explicitly provided values during retrieval display as 'undefined', which aligns with expectations as no default values were specified for those columns.
Additionally, updated the FOREIGN KEY reference from bank(name) to banks(name) for accuracy.
let me know, if i missed something.
mathiasrw commentedon Jan 2, 2024
@arximboldi Can you confirm what @jigarBorde said?
garyg1 commentedon May 22, 2025
I was able to reproduce what @arximboldi described.
Behavior seems to depend on the syntax used.
SELECT * INTO ... FROM ?andINSERT INTO ... VALUES ?INSERT INTO ... SELECT * FROM ?.Here's some minimal code that reproduces this:
garyg1 commentedon May 22, 2025
This issue might be similar to #1985, related to the treatment of missing keys in data passed in through parameters (
?s).Any prior art here? Or has this been discussed before? One approach might be to add support in AlaSQL to infer the schema of data passed via parameters, so that it can handle these cases gracefully. It seems natural for AlaSQL to do this, though some care may be needed to make the transition backwards compatible.
Add test for issue #1848: Default values not applied in FILESTORAGE a…
Fix DEFAULT values in FILESTORAGE and LOCALSTORAGE
Fix DEFAULT values FILESTORAGE and LOCALSTORAGE to close AlaSQL#1848 (A…
mathiasrw commentedon Dec 13, 2025
Fix released as part of v4.13.0