PostgreSQL schema #361

Closed
opened 2016-03-01 14:38:28 +00:00 by kesavkolla · 6 comments
kesavkolla commented 2016-03-01 14:38:28 +00:00 (Migrated from github.com)

I've all my tables in a separate schema. I don't use public schema at all. How can I set schema name at DB level so that all my types work seamlessly.

I've all my tables in a separate schema. I don't use **public** schema at all. How can I set schema name at DB level so that all my types work seamlessly.

I think this a bug of xorm. I will resolve this issue ASAP. @kesavkolla #286

I think this a bug of xorm. I will resolve this issue ASAP. @kesavkolla #286

I have push a comimt to resolve this issue. Please help to test it. @kesavkolla @tossp
You should add schema parameter on connection string if you have a specify schema not named 'public', for example,

xorm.NewEngine("postgres", "dbname=xorm_test sslmode=disable schema=public")
I have push a comimt to resolve this issue. Please help to test it. @kesavkolla @tossp You should add schema parameter on connection string if you have a specify schema not named 'public', for example, ``` Go xorm.NewEngine("postgres", "dbname=xorm_test sslmode=disable schema=public") ```
tossp commented 2016-03-09 22:14:47 +00:00 (Migrated from github.com)

Sync2同步关系的时候,貌似没有生效

我自己建了一个用户名schema,查看数据库menu表建到zh这个schema里面了

尝试插入菜单 &pq.Error{Severity:"ERROR", Code:"42P01", Message:"relation \"public.menu\" does not exist", Detail:"", Hint:"", Position:"22", InternalPosition:"", InternalQuery:"", Where:"", Schema:"", Table:"", Column:"", DataTypeName:"" , Constraint:"", File:"src\\backend\\parser\\parse_relation.c", Line:"965", Routine:"parserOpenTable"}

Sync2同步关系的时候,貌似没有生效 我自己建了一个用户名schema,查看数据库menu表建到zh这个schema里面了 `尝试插入菜单 &pq.Error{Severity:"ERROR", Code:"42P01", Message:"relation \"public.menu\" does not exist", Detail:"", Hint:"", Position:"22", InternalPosition:"", InternalQuery:"", Where:"", Schema:"", Table:"", Column:"", DataTypeName:"" , Constraint:"", File:"src\\backend\\parser\\parse_relation.c", Line:"965", Routine:"parserOpenTable"}`

OK. 我看下。@tossp

OK. 我看下。@tossp

I think maybe #379 is a better solution for schema of pg, so that I will close this issue and revert the old method. That means it will not be supported schema parameter on connection string. @tossp

I think maybe #379 is a better solution for schema of pg, so that I will close this issue and revert the old method. That means it will not be supported schema parameter on connection string. @tossp

closed by #876

closed by #876
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#361
No description provided.