enumCatalogMisuseRule
enum CatalogMisuseRule: string
@visibility public.The rules of PostgreSQL a grammatical catalog command can break, in the words of the server.
A %s in a message stands for a name or text the problem is about. Source: https://www.postgresql.org/docs/17/sql-createschema.html, https://www.postgresql.org/docs/17/sql-createdatabase.html, https://www.postgresql.org/docs/17/sql-alterdatabase.html, https://www.postgresql.org/docs/17/sql-createextension.html, https://www.postgresql.org/docs/17/sql-altertablespace.html, https://www.postgresql.org/docs/17/sql-createpublication.html, https://www.postgresql.org/docs/17/sql-alterpublication.html, https://www.postgresql.org/docs/17/sql-altertype.html, https://www.postgresql.org/docs/17/sql-createtype.html.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze("ALTER TYPE t DROP VALUE 'a'");
$operation->facts->diagnostics[0]->rule // => \SqlSemantics\Platform\PostgreSql\Statement\Catalog\Problem\CatalogMisuseRule::EnumValueDropCases§
case SchemaElementsIfNotExists = 'CREATE SCHEMA IF NOT EXISTS cannot include schema elements'case ReservedSchemaName = 'unacceptable schema name "%s"'case ElementSchemaMismatch = 'CREATE specifies a schema (%s) different from the one being created (%s)'case RedundantOptions = 'conflicting or redundant options'case UnknownOption = 'option "%s" not recognized'case ExclusiveOption = 'option "%s" cannot be specified with other options'case ExtensionFrom = 'CREATE EXTENSION ... FROM is no longer supported'case ResetWithValues = 'RESET must not include values for parameters'case PublicationListStart = 'invalid publication object list'case PublicationTableName = 'invalid table name'case PublicationSchemaName = 'invalid schema name'case PublicationSchemaWhere = 'WHERE clause not allowed for schema'case PublicationSchemaColumns = 'column specification not allowed for schema'case PublicationDropWhere = 'cannot use a WHERE clause when removing a table from a publication'case PublicationDropColumns = 'column list must not be specified in ALTER PUBLICATION ... DROP'case PublicationMissingColumn = 'column "%s" of relation "%s" does not exist'case PublicationSystemColumn = 'cannot use system column "%s" in publication column list'case PublicationDuplicateColumn = 'duplicate column "%s" in publication column list'case EnumValueDrop = 'dropping an enum value is not implemented'case EnumLabelLength = 'invalid enum label "%s"'case AttributeTwice = 'column "%s" specified more than once'case DomainUnique = 'unique constraints not possible for domains'case DomainPrimaryKey = 'primary key constraints not possible for domains'case DomainExclusion = 'exclusion constraints not possible for domains'case DomainForeignKey = 'foreign key constraints not possible for domains'case DomainDeferrability = 'specifying constraint deferrability not supported for domains'case DomainGenerated = 'specifying GENERATED not supported for domains'case DomainNullConflict = 'conflicting NULL/NOT NULL constraints'case DomainDefaults = 'multiple default expressions'case DomainCheckNoInherit = 'check constraints for domains cannot be marked NO INHERIT'case MarkedDeferrable = '%s constraints cannot be marked DEFERRABLE'case MarkedNotValid = '%s constraints cannot be marked NOT VALID'case ImproperName = 'improper qualified name (too many dotted names): %s'Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 2
Relations§
Constant reads 35
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainChecks::constraints() packages/sql-semantics-postgres/src/Rules/Catalog/DomainChecks.php:43
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainChecks::constraints() packages/sql-semantics-postgres/src/Rules/Catalog/DomainChecks.php:54
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainChecks::constraints() packages/sql-semantics-postgres/src/Rules/Catalog/DomainChecks.php:58
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainChecks::constraints() packages/sql-semantics-postgres/src/Rules/Catalog/DomainChecks.php:61
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainChecks::rule() packages/sql-semantics-postgres/src/Rules/Catalog/DomainChecks.php:72
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainChecks::rule() packages/sql-semantics-postgres/src/Rules/Catalog/DomainChecks.php:73
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainChecks::rule() packages/sql-semantics-postgres/src/Rules/Catalog/DomainChecks.php:74
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainChecks::rule() packages/sql-semantics-postgres/src/Rules/Catalog/DomainChecks.php:75
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainChecks::rule() packages/sql-semantics-postgres/src/Rules/Catalog/DomainChecks.php:76
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainChecks::attributes() packages/sql-semantics-postgres/src/Rules/Catalog/DomainChecks.php:94
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainChecks::attributes() packages/sql-semantics-postgres/src/Rules/Catalog/DomainChecks.php:95
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainChecks::attributes() packages/sql-semantics-postgres/src/Rules/Catalog/DomainChecks.php:96
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainChecks::attributes() packages/sql-semantics-postgres/src/Rules/Catalog/DomainChecks.php:100
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainInput::undeclared() packages/sql-semantics-postgres/src/Rules/Catalog/DomainInput.php:59
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\OptionChecks::redundant() packages/sql-semantics-postgres/src/Rules/Catalog/OptionChecks.php:49
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\OptionChecks::database() packages/sql-semantics-postgres/src/Rules/Catalog/OptionChecks.php:68
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\OptionChecks::database() packages/sql-semantics-postgres/src/Rules/Catalog/OptionChecks.php:73
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublicationList::rule() packages/sql-semantics-postgres/src/Rules/Catalog/PublicationList.php:84
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublicationList::rule() packages/sql-semantics-postgres/src/Rules/Catalog/PublicationList.php:87
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublicationList::rule() packages/sql-semantics-postgres/src/Rules/Catalog/PublicationList.php:91
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublicationList::rule() packages/sql-semantics-postgres/src/Rules/Catalog/PublicationList.php:92
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublicationList::rule() packages/sql-semantics-postgres/src/Rules/Catalog/PublicationList.php:93
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublicationList::rule() packages/sql-semantics-postgres/src/Rules/Catalog/PublicationList.php:98
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublicationList::rule() packages/sql-semantics-postgres/src/Rules/Catalog/PublicationList.php:99
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublishedTables::columns() packages/sql-semantics-postgres/src/Rules/Catalog/PublishedTables.php:78
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublishedTables::columns() packages/sql-semantics-postgres/src/Rules/Catalog/PublishedTables.php:80
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublishedTables::columns() packages/sql-semantics-postgres/src/Rules/Catalog/PublishedTables.php:84
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\TypeChecks::labels() packages/sql-semantics-postgres/src/Rules/Catalog/TypeChecks.php:37
- class-const SqlSemantics\Platform\PostgreSql\Rules\Catalog\TypeChecks::attributes() packages/sql-semantics-postgres/src/Rules/Catalog/TypeChecks.php:53
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Extension\CreateExtension::deriveStatement() packages/sql-semantics-postgres/src/Statement/Catalog/Extension/CreateExtension.php:61
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Schema\CreateSchema::deriveStatement() packages/sql-semantics-postgres/src/Statement/Catalog/Schema/CreateSchema.php:74
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Schema\CreateSchema::deriveStatement() packages/sql-semantics-postgres/src/Statement/Catalog/Schema/CreateSchema.php:77
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Schema\CreateSchema::deriveStatement() packages/sql-semantics-postgres/src/Statement/Catalog/Schema/CreateSchema.php:88
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Tablespace\AlterTablespaceOptions::deriveStatement() packages/sql-semantics-postgres/src/Statement/Catalog/Tablespace/AlterTablespaceOptions.php:58
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Type\DropEnumLabel::deriveStatement() packages/sql-semantics-postgres/src/Statement/Catalog/Type/DropEnumLabel.php:46
Type declarations 3
- type SqlSemantics\Platform\PostgreSql\Rules\Catalog\DomainChecks packages/sql-semantics-postgres/src/Rules/Catalog/DomainChecks.php:68
- type SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublicationList packages/sql-semantics-postgres/src/Rules/Catalog/PublicationList.php:81
- type SqlSemantics\Platform\PostgreSql\Statement\Catalog\Problem\CatalogMisuse packages/sql-semantics-postgres/src/Statement/Catalog/Problem/CatalogMisuse.php:31