当前位置:网站首页>In Kingbase, the user is specified to search the schema by default, or the user cannot use the function under the public schema
In Kingbase, the user is specified to search the schema by default, or the user cannot use the function under the public schema
2022-07-28 22:00:00 【straight left】
kingbase There are some weird settings ,search_path It's one of them . This command is used to set the user's default schema. If not set , Such as user user1 Want to read schema2 The table below , That's in sql It should be indicated in schema. Such as :
select * from schema2.table1;
If you don't want to toss like this , Then we will schema2 Designated as user1 Default schema:
alter user user1 set search_path to schema2;
however ! There is a problem with the above sentence ! Can cause user1 Default schema It's just schema2, Thus losing the public schema public Default access to . Actually this search_path and windows In environment variable path similar , It can specify multiple . It specifies a , Override default , It could be accessed naturally public Of the lower element , Not now . Not long ago , We have a kingbase Library installed kingbaseGIS, Added support for spatial data . And these spatial functions , be located public Next :

The results are executed as follows SQL, I can't live or die , Always reporting mistakes , Can't recognize this ST_Polygon.
SELECT ST_Polygon(ST_GeomFromText(
'LINESTRING(75.15 29.53,77 29,77.6 29.5, 75.15 29.53)'),
4326);
Give the user permission to be omnipotent , Not yet. . Later, people who were still in the gold warehouse of NPC found the crux of the problem , This is this. seach_path problem . The right thing to do is :
alter user user1 set search_path to schema2,PUBLIC,SYS_CATALOG;
kingbase Derived from postgreSQL. It is estimated that this problem is inherited . This search_path I don't understand , I don't know .
边栏推荐
- OA项目之会议通知(查询&是否参会&反馈详情)
- C语言入门【详细】
- Information fusion method and application of expert opinion and trust in large group emergency decision-making based on complex network
- Implementation of sequence table
- 基于多模态融合的非遗图片分类研究
- Bully is filed for bankruptcy! The company has become a "Lao Lai", and the legal person is restricted from high consumption
- 如何在 Web3中建立一个去中心化社区
- Leetcode linked list problem -- 142. circular linked list II (learn the linked list by one question and one article)
- 基于复杂网络的大群体应急决策专家意见与信任信息融合方法及应用
- Have you ever seen this kind of dynamic programming -- the stock problem of state machine dynamic programming (Part 2)
猜你喜欢

Gateway technology of IOT technology stack

迪赛智慧数——折线图(堆叠面积图):2022年不同职业人群存款额占月收入比例排名

No swagger, what do I use?

How is nanoid faster and more secure than UUID implemented? (glory Collection Edition)

Cross domain transfer learning of professional skill word extraction in Chinese recruitment documents

LeetCode·581.最短无序连续子数组·双指针

HCIA comprehensive experiment (take Huawei ENSP as an example)

Pytoch learning record (III): random gradient descent, neural network and full connection

基于对象的实时空间音频渲染丨Dev for Dev 专栏

开放式耳机哪个品牌好、性价比最高的开放式耳机排名
随机推荐
Nano gold coupled antibody / protein Kit (20nm, 1mg/100 μ g/500 μ G coupling amount) preparation
With the help of domestic chip manufacturers, the shipment of white brand TWS headphones has reached 600million in 2020
Leetcode linked list question - interview question 02.07. linked list intersection (learn linked list by one question and one article)
大学荒废三年,大四自学7个月测试,找到了12K的工作
Zhuzhou Jiufang middle school carried out drowning prevention and fire safety education and training activities
Apifox:满足你对 Api 的所有幻想
使用Mock技术帮助提升测试效率的小tips,你知道几个?
Use pl/sql
Edited by vimtutor
C语言入门【详细】
HCIA comprehensive experiment (take Huawei ENSP as an example)
Esp8266 Arduino programming example - SPIFs and data upload (Arduino IDE and platformio IDE)
Gateway technology of IOT technology stack
Practice and exploration of overseas site Seata of ant group
How does MySQL archive data?
Hold high the two flags of 5g and AI: Ziguang zhanrui Market Summit is popular in Shencheng
Rhcsa first day
It is said that Microsoft has obtained the supply license for Xianghua! Will Huawei usher in the full lifting of the ban?
中文招聘文档中专业技能词抽取的跨域迁移学习
ESP8266-Arduino编程实例-深度休眠与唤醒