On 11-03-2026 10:55, Tomasz Dubiel wrote:
> Firebird 3.0.13. Why doesn't this work:
> SET STATISTICS INDEX PK___EFMigrationsLock;
> and this does work:
> SET STATISTICS INDEX "PK___EFMigrationsLock";
> First try gives:
> ALTER INDEX PK___EFMIGRATIONSLOCK failed.
> Index not found.
The regular identifier PK___EFMigrationsLock is handled as the fully
uppercase equivalent PK___EFMIGRATIONSLOCK (i.e.
"PK___EFMIGRATIONSLOCK"), while the delimited identifier (or quoted
identifier) "PK___EFMigrationsLock" is used as-is.
Regular identifiers (unquoted identifiers) are said to be
case-insensitive, but that is a simplification of how it really works:
When a regular identifier is parsed, it is converted to its uppercase
equivalent. That uppercase equivalent is then used, which makes it
behave as if it's case-insensitive with respect to other regular
identifiers or delimited identifiers that are fully uppercase. It is not
equivalent to a delimited identifiers that contain any lowercase
equivalent character.
The identifier in your database is "PK___EFMigrationsLock", not
"PK___EFMIGRATIONSLOCK" (intentionally surrounding both with quotes
here), so the regular identifier PK___EFMigrationsLock does not match,
while the delimited identifier "PK___EFMigrationsLock" does.
Mark
--
Mark Rotteveel