数据库-Duckdb-catalog和schema

创建数据库

1.会有一个或者两个文件
  .duckbd
  .wal	  
2.  用户的数据库名称--databasename-database_oid
数据库对象表的全限定名可表示为:Catalog名.Schema名.表名 
 01. DuckDB's two internal database schema names, system and temp . 有两个内部的数据schema_name 
    TEMP_CATALOG    SYSTEM_CATALOG  INVALID_CATALOG
 02.   name of current database (called "catalog" in the SQL standard)
  DEFAULT_SCHEMA
   DefaultSchema:  information_schema  pg_catalog
	
跨模式访问--当前模式schema访问其他schema  search_path也称模式搜索路径	
 
    ##参考: https://duckdb.org/docs/sql/keywords_and_identifiers.html
	 system or built-in database.
	 a user-defined database
   search_path 来进行设置 catalog_name:	 
   默认的search schema --main  
database/catalog_name: mydata system temp
schema_name: information_schema main pg_catalog 
对应文件:system temp
3.DuckDB offers a collection of table functions that provide metadata about the current database. 
  These functions reside in the main schema and their names are prefixed with duckdb_.
   保存在 main schema内的
   
   
4.具体示例如下:
 mydata	
    information_schema main pg_catalog 
 system 
    information_schema main pg_catalog 
 temp
    information_schema main pg_catalog
	
内容:main中有
      These functions reside in the main schema and their names are prefixed with duckdb_	

了解和查看

duckdb_schemas
duckdb_databases
duckdb_keywords()

学习和使用

SELECT * FROM duckdb_settings();		  
posted @ 2024-06-11 14:39  辰令  阅读(14)  评论(0编辑  收藏  举报