开发者

web application cannot see tables in new postgresql schema

I moved some tables in my postgresql (8.2) database to a new schema. at first, my "user" could not see the tables in the new schema, but I used set search_path to tell it to look in this new schema

I access these tables with a simple web application that uses hibernate. At first, my web application, which uses the "user" user, could not see the tables either, even after I set the search_path. I eventually set the default-schema in the hibernate config file and it worked, but I understand from what I've read that I should not have to set this property? I have a few JDBC queries in this app that still can't see the tables in the new schema.

I've browsed through the postgresql docs and can't find the cause of my problems. Is there something simple I'm mi开发者_运维技巧ssing?


SET search_path is not persisted. It is only valid for the current session.

You need to use ALTER USER to make that change permanently, but you don't need special privileges to change the user you are logged in with (i.e. "yourself")

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜