-
-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Labels
Milestone
Description
Summary
CockroachDBModel inherits PostgreSQL's $identitySelect() which calls pg_get_serial_sequence() and currval(). These may not work correctly with CockroachDB's unique_rowid() default values.
Details
- PostgreSQL uses sequences behind
SERIAL—currval()retrieves last inserted value - CockroachDB's
unique_rowid()doesn't use sequences, sopg_get_serial_sequence()returns NULL - Need CockroachDB-specific identity retrieval, likely using
RETURNINGclause - CockroachDB supports
INSERT INTO ... RETURNING idnatively
Files
vendor/wheels/databaseAdapters/CockroachDB/CockroachDBModel.cfc— needs$identitySelect()overridevendor/wheels/databaseAdapters/PostgreSQL/PostgreSQLModel.cfc:124-171— inherited method
Reactions are currently unavailable