FR-001checkpassingbind MUST take an optional schema, a name in governance's way of writing names, and where none is given the statements it makes MUST be the same as they were before this specification.
0013-sql-qualified-names · owner if · domain data
FR-001checkpassingbind MUST take an optional schema, a name in governance's way of writing names, and where none is given the statements it makes MUST be the same as they were before this specification.
FR-002checkpassingFor a dialect that has the feature schemas, bind MUST make the schema first (CREATE SCHEMA IF NOT EXISTS, in the group of setup) and MUST write every reference to a table qualified by it: in CREATE TABLE, in the REFERENCES of a foreign key, in ON of an index, in ALTER TABLE and in an upsert.
Cited by: Data, sql/physical/qualify
FR-003checkpassingFor a dialect that lacks it, bind MUST write the words of the schema before the words of each table's name, with the case style, and MUST write no CREATE SCHEMA; the length of a name MUST be checked after the words are added.
FR-004checkpassingWhat a statement source is given (written) MUST give the reference to a table by its identity (ref), the reference to a table of an extension by the name it is written by (qualify) and the name a table of an extension is written by after the schema's words are added (tableName), so that an extension never builds a reference by hand.
Cited by: sql/physical/express, sql/physical/statement
FR-005checkpassingThe comments, the documentation tables, the governance tables, the views, the access (policies and grants), the routines and the partitions MUST write every reference to a table through FR-004, and the tables that an extension makes MUST be made in the same schema as the tables they describe.
FR-006checkpassingA state MUST record the schema (qualifier) where the dialect has schemas, so that a state of one schema is another state than that of none; and a plan MUST write the references of its statements, and the probes of its guards, qualified by it.
Cited by: sql/lifecycle/state
FR-007checkpassingThe steps of a plan from empty, and then from each version to the next, MUST leave on SQLite, DuckDB and PostgreSQL the database that bind makes for the last version in the same schema.
FR-008checkpassingOn DuckDB and PostgreSQL the tables, their foreign keys, their indexes, their reference rows, their comments and the tables of the documentation extensions MUST be in the schema and none in the default one; on SQLite the same tables MUST be there with the schema's words before their names.
data on PostgreSQL: "data"."book", per FR-002; on SQLite data_book, and in camel case dataBook, per FR-003.ON "data"."document", per FR-005.OQ-1open questionWhether schema may be a list (a schema of tables and another of reference data).
SC-001success criterionThe same governance gives the same tables in any schema, and an extension never has to know whether the engine has schemas.
Data, sql/lifecycle/plan, sql/lifecycle/state, sql/physical/bind, sql/physical/express, sql/physical/qualify, sql/physical/statement, Protected access