当前位置:网站首页>瀚高数据库自定义操作符‘!~~‘
瀚高数据库自定义操作符‘!~~‘
2022-06-26 05:05:00 【瀚高PG实验室】
瀚高数据库
目录
环境
文档用途
详细信息
环境
系统平台:Microsoft Windows (64-bit) 10
版本:5.6.5
文档用途
解决应用程序中SQL语句使用!~~匹配操作符时,遇到的错误:
ERROR: 42883: operator does not exist: integer !~~ integer
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
详细信息
一,测试准备
创建表并插入数据:
create TABLE oper_test(first_num int);
insert into oper_test values(234),(446),(467);
二,测试查询
select (446 !~~ first_num) newlist from oper_test;

三,解决方案:自定义操作符
CREATE OR REPLACE FUNCTION hgdb_catalog.intnlike(integer,integer)
RETURNS boolean AS $$
select $1::varchar !~~ $2::varchar;
$$
LANGUAGE sql strict;
ALTER FUNCTION intnlike(integer, integer)
OWNER TO highgo;
COMMENT ON FUNCTION intnlike(integer,integer) IS 'implementation of !~~ operator';
create operator hgdb_catalog.!~~(
procedure = hgdb_catalog.intnlike,
leftarg = integer,
rightarg = integer
);
四,再次查询

边栏推荐
- Astype conversion data type
- ROS notes (07) - Implementation of client and server
- How to select the data transmission format of instant messaging application
- 一个从坟墓里爬出的公司
- Zuul 實現動態路由
- [unity3d] collider assembly
- Yolov5 super parameter setting and data enhancement analysis
- C# 39. string类型和byte[]类型相互转换(实测)
- Lstms in tensorflow_ Cell actual combat
- 22.2.8
猜你喜欢

广和通联合安提国际为基于英伟达 Jetson Xavier NX的AI边缘计算平台带来5G R16强大性能

How to select the data transmission format of instant messaging application

Zhongshanshan: engineers after being blasted will take off | ONEFLOW u

LeetCode 19. 删除链表的倒数第 N 个结点

Ai+ remote sensing: releasing the value of each pixel

5. < tag stack and general problems > supplement: lt.946 Verify the stack sequence (the same as the push in and pop-up sequence of offer 31. stack)

Tensorflow and deep learning day 3

zencart新建的URL怎么重写伪静态

Schematic diagram of UWB ultra high precision positioning system
![[unity3d] human computer interaction input](/img/4d/47f6d40bb82400fe9c6d624c8892f7.png)
[unity3d] human computer interaction input
随机推荐
Resample
2022.1.24
[quartz] read configuration from database to realize dynamic timing task
Multipass Chinese document - remove instance
【Unity3D】人机交互Input
Sentimentin tensorflow_ analysis_ cell
PHP之一句话木马
PowerShell runtime system IO exceptions
Introduction to classification data cotegory and properties and methods of common APIs
How MySQL deletes all redundant duplicate data
2022.2.11
Sentimentin tensorflow_ analysis_ layer
dijkstra
Wechat applet exits the applet (navigator and api--wx.exitminiprogram)
pycharm 导包错误没有警告
Statsmodels Library -- linear regression model
ssh连win10报错:Permission denied (publickey,keyboard-interactive).
Rsync common error messages (common errors on the window)
Illustration of ONEFLOW's learning rate adjustment strategy
Créateur de génie: cavalier solitaire, magnat de la technologie et ai | dix ans d'apprentissage profond