github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/opt/optbuilder/testdata/virtual-scan (about) 1 build 2 SELECT * FROM information_schema.does_not_exist 3 ---- 4 error (42P01): no data source matches prefix: "information_schema.public.does_not_exist" 5 6 build 7 SELECT * FROM information_schema.columns 8 ---- 9 project 10 ├── columns: table_catalog:2!null table_schema:3!null table_name:4!null column_name:5!null ordinal_position:6!null column_default:7 is_nullable:8!null data_type:9!null character_maximum_length:10 character_octet_length:11 numeric_precision:12 numeric_precision_radix:13 numeric_scale:14 datetime_precision:15 interval_type:16 interval_precision:17 character_set_catalog:18 character_set_schema:19 character_set_name:20 collation_catalog:21 collation_schema:22 collation_name:23 domain_catalog:24 domain_schema:25 domain_name:26 udt_catalog:27 udt_schema:28 udt_name:29 scope_catalog:30 scope_schema:31 scope_name:32 maximum_cardinality:33 dtd_identifier:34 is_self_referencing:35 is_identity:36 identity_generation:37 identity_start:38 identity_increment:39 identity_maximum:40 identity_minimum:41 identity_cycle:42 is_generated:43 generation_expression:44 is_updatable:45 is_hidden:46!null crdb_sql_type:47!null 11 └── scan information_schema.columns 12 └── columns: crdb_internal_vtable_pk:1!null table_catalog:2!null table_schema:3!null table_name:4!null column_name:5!null ordinal_position:6!null column_default:7 is_nullable:8!null data_type:9!null character_maximum_length:10 character_octet_length:11 numeric_precision:12 numeric_precision_radix:13 numeric_scale:14 datetime_precision:15 interval_type:16 interval_precision:17 character_set_catalog:18 character_set_schema:19 character_set_name:20 collation_catalog:21 collation_schema:22 collation_name:23 domain_catalog:24 domain_schema:25 domain_name:26 udt_catalog:27 udt_schema:28 udt_name:29 scope_catalog:30 scope_schema:31 scope_name:32 maximum_cardinality:33 dtd_identifier:34 is_self_referencing:35 is_identity:36 identity_generation:37 identity_start:38 identity_increment:39 identity_maximum:40 identity_minimum:41 identity_cycle:42 is_generated:43 generation_expression:44 is_updatable:45 is_hidden:46!null crdb_sql_type:47!null 13 14 # Since we lazily create these, the name resolution codepath is slightly 15 # different on the second resolution. 16 build 17 SELECT * FROM information_schema.columns 18 ---- 19 project 20 ├── columns: table_catalog:2!null table_schema:3!null table_name:4!null column_name:5!null ordinal_position:6!null column_default:7 is_nullable:8!null data_type:9!null character_maximum_length:10 character_octet_length:11 numeric_precision:12 numeric_precision_radix:13 numeric_scale:14 datetime_precision:15 interval_type:16 interval_precision:17 character_set_catalog:18 character_set_schema:19 character_set_name:20 collation_catalog:21 collation_schema:22 collation_name:23 domain_catalog:24 domain_schema:25 domain_name:26 udt_catalog:27 udt_schema:28 udt_name:29 scope_catalog:30 scope_schema:31 scope_name:32 maximum_cardinality:33 dtd_identifier:34 is_self_referencing:35 is_identity:36 identity_generation:37 identity_start:38 identity_increment:39 identity_maximum:40 identity_minimum:41 identity_cycle:42 is_generated:43 generation_expression:44 is_updatable:45 is_hidden:46!null crdb_sql_type:47!null 21 └── scan information_schema.columns 22 └── columns: crdb_internal_vtable_pk:1!null table_catalog:2!null table_schema:3!null table_name:4!null column_name:5!null ordinal_position:6!null column_default:7 is_nullable:8!null data_type:9!null character_maximum_length:10 character_octet_length:11 numeric_precision:12 numeric_precision_radix:13 numeric_scale:14 datetime_precision:15 interval_type:16 interval_precision:17 character_set_catalog:18 character_set_schema:19 character_set_name:20 collation_catalog:21 collation_schema:22 collation_name:23 domain_catalog:24 domain_schema:25 domain_name:26 udt_catalog:27 udt_schema:28 udt_name:29 scope_catalog:30 scope_schema:31 scope_name:32 maximum_cardinality:33 dtd_identifier:34 is_self_referencing:35 is_identity:36 identity_generation:37 identity_start:38 identity_increment:39 identity_maximum:40 identity_minimum:41 identity_cycle:42 is_generated:43 generation_expression:44 is_updatable:45 is_hidden:46!null crdb_sql_type:47!null 23 24 # Alias the virtual table name. 25 build 26 SELECT * FROM information_schema.columns c 27 ---- 28 project 29 ├── columns: table_catalog:2!null table_schema:3!null table_name:4!null column_name:5!null ordinal_position:6!null column_default:7 is_nullable:8!null data_type:9!null character_maximum_length:10 character_octet_length:11 numeric_precision:12 numeric_precision_radix:13 numeric_scale:14 datetime_precision:15 interval_type:16 interval_precision:17 character_set_catalog:18 character_set_schema:19 character_set_name:20 collation_catalog:21 collation_schema:22 collation_name:23 domain_catalog:24 domain_schema:25 domain_name:26 udt_catalog:27 udt_schema:28 udt_name:29 scope_catalog:30 scope_schema:31 scope_name:32 maximum_cardinality:33 dtd_identifier:34 is_self_referencing:35 is_identity:36 identity_generation:37 identity_start:38 identity_increment:39 identity_maximum:40 identity_minimum:41 identity_cycle:42 is_generated:43 generation_expression:44 is_updatable:45 is_hidden:46!null crdb_sql_type:47!null 30 └── scan c 31 └── columns: crdb_internal_vtable_pk:1!null table_catalog:2!null table_schema:3!null table_name:4!null column_name:5!null ordinal_position:6!null column_default:7 is_nullable:8!null data_type:9!null character_maximum_length:10 character_octet_length:11 numeric_precision:12 numeric_precision_radix:13 numeric_scale:14 datetime_precision:15 interval_type:16 interval_precision:17 character_set_catalog:18 character_set_schema:19 character_set_name:20 collation_catalog:21 collation_schema:22 collation_name:23 domain_catalog:24 domain_schema:25 domain_name:26 udt_catalog:27 udt_schema:28 udt_name:29 scope_catalog:30 scope_schema:31 scope_name:32 maximum_cardinality:33 dtd_identifier:34 is_self_referencing:35 is_identity:36 identity_generation:37 identity_start:38 identity_increment:39 identity_maximum:40 identity_minimum:41 identity_cycle:42 is_generated:43 generation_expression:44 is_updatable:45 is_hidden:46!null crdb_sql_type:47!null 32 33 # Virtual tables can't have index hints. 34 35 build 36 SELECT * FROM information_schema.tables@primary 37 ---- 38 error (42601): index flags not allowed with virtual tables