当前位置:网站首页>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 .
边栏推荐
- Matlab|基础知识总结一
- The Swedish court lifted the 5g spectrum auction ban on Huawei and ZTE
- 基于属性词补全的武器装备属性抽取研究
- Wechat applet development company, do you know how to choose?
- Esp8266 Arduino programming example - deep sleep and wake up
- 微信小程序开发入门,自己开发小程序
- Lt7911d type-c/dp to Mipi scheme is mature and can provide technical support
- Technology selection rust post analysis
- Which brand is the best and most cost-effective open headset
- 搞事摸鱼一天有一天
猜你喜欢

Nano gold coupled antibody / protein Kit (20nm, 1mg/100 μ g/500 μ G coupling amount) preparation

Save 70% of the video memory and increase the training speed by 2 times! Zheda & Ali proposed online convolution re parameterization orepa, and the code has been open source! (CVPR 2022 )

Matlab from introduction to mastery Chapter 1 Introduction to matlab

Gateway technology of IOT technology stack

数据可视化新闻,不一样的新闻报道形式

Implementation of sequence table

kingbase中指定用户默认查找schema,或曰用户无法使用public schema下函数问题

入行4年,跳槽2次,我摸透了软件测试这一行~

I have been in the industry for 4 years and changed jobs twice. I have understood the field of software testing~

Openeuler embedded sig | distributed soft bus
随机推荐
Vimtutor编辑
Huawei releases the first electric drive system driveone: charging for 10 minutes, endurance of 200km
Layout the 6G track in advance! Ziguang zhanrui released the white paper "6G unbounded AI"
从 Web3到Web2.5,是倒退还是另辟蹊径?
如何优雅的设计工作流引擎(荣耀典藏版)
Matlab|基础知识总结一
使用Mock技术帮助提升测试效率的小tips,你知道几个?
Introduction to wechat applet development, develop your own applet
Mesh data generation function meshgrid
开放式耳机哪个音质好、公认音质好的气传导耳机推荐
kali里的powersploit、evasion、weevely等工具的杂项记录
这种动态规划你见过吗——状态机动态规划之股票问题(下)
比UUID更快更安全NanoID到底是怎么实现的?(荣耀典藏版)
Storage and steps of phospholipid coupled antibody / protein Kit
MATLAB从入门到精通 第1章 MATLAB入门
Two global variables__ Dirname and__ Further introduction to common functions of filename and FS modules
LeetCode·581.最短无序连续子数组·双指针
[Bluetooth Bluetooth development] VIII. Transmission layer of ble protocol
Technology selection rust post analysis
The University was abandoned for three years, the senior taught himself for seven months, and found a 12K job