在postgresql中,build a database
$ createdb name
然后create a table in the "name" database
$ psql -f ~/db/createdummy.sql -d name
then we have a empty database.
具体如何建立table, 阅读createdummy.sql的内容,查阅相关postgresql的语句
有了database以后,如何进入postgresql进行表的建立,遇到如下的错误:
$ psql -d name -U databaseusername
psql: warning: extra command-line argument databaseusername ignored
-U表示的是database的用户名,但是这里的 用户仍然是ubuntu的用户名,而不是刚才建立的database的用户名。
后面的工作,
we will extract data in a bag file to the table by "extract_data_from_bag.py"

本文详细介绍了在PostgreSQL中创建数据库和表的方法,并提供了解决登录时出现用户名忽略错误的解决方案。通过阅读createdummy.sql文件获取创建表所需的具体SQL语句,最终实现从bag文件中提取数据填充到指定表中。
1140

被折叠的 条评论
为什么被折叠?



