Friendly reminder:
I have encountered a situation where a query with UNION and UNION ALL resulted in a stable different row order...
UNION is often used for something like this:
It is important that if a record with 'user_input' is found, it should be the first record in the result.
In such a case, add an ORDER BY of this form to the query:
The UNION and UNION ALL operators may order the rows in the final result set in an unspecified order. For example, it may place rows from the second result set before/after the row from the first result set.
I have encountered a situation where a query with UNION and UNION ALL resulted in a stable different row order...
UNION is often used for something like this:
SELECT * FROM (
SELECT id FROM t WHERE name = 'user_input'
UNION
SELECT id FROM t WHERE name = 'default_value'
)
LIMIT 1
It is important that if a record with 'user_input' is found, it should be the first record in the result.
In such a case, add an ORDER BY of this form to the query:
ORDER BY name = 'default_value'
๐3๐ค3๐คจ1
mysql 9.0
https://dev.mysql.com/doc/refman/9.0/en/mysql-nutshell.html
What do you think they never did? modifying CTE and RETURNING
https://dev.mysql.com/doc/refman/9.0/en/mysql-nutshell.html
What do you think they never did? modifying CTE and RETURNING
๐ฅฐ3
There will be no singularity
https://masteringpostgres.com/types thx https://x.com/samokhvalov/status/1846674221419966485?s=46
btw, donโt forget about https://wiki.postgresql.org/wiki/Don't_Do_This
๐4๐ฅ2๐1๐1
fxtwitter.com/samwillis/status/1848672368819892233
Five years ago, in holistic.dev, we made full-fledged type inferences at any point in a query based on static analysis techniques. In addition to types, nullable and row count classes (none/one/one_or_none/many/many_or_none) were output...
https://www.youtube.com/watch?v=ZzAgacFBr48
Five years ago, in holistic.dev, we made full-fledged type inferences at any point in a query based on static analysis techniques. In addition to types, nullable and row count classes (none/one/one_or_none/many/many_or_none) were output...
https://www.youtube.com/watch?v=ZzAgacFBr48
๐งต Thread โข FxTwitter / FixupX
Sam Willis (@samwillis)
I had an idea... can we automatically infer parameter and return types from a raw SQL query ๐ค
Yes we can using PGlite! ๐คฏ
No ORM or query builder, just types generated straight from the SQL string. ๐งต
Yes we can using PGlite! ๐คฏ
No ORM or query builder, just types generated straight from the SQL string. ๐งต
๐1
Letโs build another one(s) s3 based databases!
https://aws.amazon.com/about-aws/whats-new/2024/12/amazon-s3-metadata-preview
https://aws.amazon.com/about-aws/whats-new/2024/12/amazon-s3-metadata-preview
๐2๐2
There will be no singularity
https://fxtwitter.com/franckpachot/status/1864099939590041799?s=46
๐งต Thread โข FxTwitter / FixupX
Craig Kerstiens - Finger lime evangelist (@craigkerstiens)
"Postgres compatible"
- No views/triggers/sequences
- No foreign key constraints
- No extensions
- No NOTIFY ("ERROR: Function pg_notify not supported")
- No nested transactions
- No JSONB
What, what IS it compatible with?
- No views/triggers/sequences
- No foreign key constraints
- No extensions
- No NOTIFY ("ERROR: Function pg_notify not supported")
- No nested transactions
- No JSONB
What, what IS it compatible with?
๐คฃ11๐คทโโ2