当前位置:网站首页>Henkel database custom operator '~~‘
Henkel database custom operator '~~‘
2022-06-26 05:14:00 【Henkel PG Lab】
Henkel database
Catalog
Environmental Science
Document purpose
Details
Environmental Science
system platform :Microsoft Windows (64-bit) 10
edition :5.6.5
Document purpose
Solve problems in the application SQL Statements use !~~ When matching operators , Mistakes encountered :
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.
Details
One , Test preparation
Create tables and insert data :
create TABLE oper_test(first_num int);
insert into oper_test values(234),(446),(467);
Two , Test the query
select (446 !~~ first_num) newlist from oper_test;

3、 ... and , Solution : Custom operators
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
);
Four , Query again

边栏推荐
- 线程优先级
- Decipher the AI black technology behind sports: figure skating action recognition, multi-mode video classification and wonderful clip editing
- C# 40. byte[]与16进制string互转
- Difference between return and yield
- SOFA Weekly | 开源人—于雨、本周 QA、本周 Contributor
- CMakeLists.txt Template
- Tp5.0框架 PDO连接mysql 报错:Too many connections 解决方法
- 6.1 - 6.2 公钥密码学简介
- LSTM in tensorflow_ Layers actual combat
- 《财富自由之路》读书之一点体会
猜你喜欢

【活动推荐】云原生、产业互联网、低代码、Web3、元宇宙……哪个是 2022 年架构热点?...

86. (cesium chapter) cesium overlay surface receiving shadow effect (gltf model)

Happy New Year!

【红队】要想加入红队,需要做好哪些准备?

Replacing domestic image sources in openwrt for soft routing (take Alibaba cloud as an example)
The wechat team disclosed that the wechat interface is stuck with a super bug "15..." The context of

86.(cesium篇)cesium叠加面接收阴影效果(gltf模型)

2. < tag dynamic programming and conventional problems > lt.343 integer partition

Mongodb image configuration method

Setting pseudo static under fastadmin Apache
随机推荐
程序人生
Datetime data type - min() get the earliest date and date_ Range() creates a date range, timestamp() creates a timestamp, and tz() changes the time zone
Transport layer TCP protocol and UDP protocol
GD32F3x0 官方PWM驱动正频宽偏小(定时不准)的问题
PHP之一句话木马
Two step processing of string regular matching to get JSON list
Zuul implements dynamic routing
Fedora alicloud source
Happy New Year!
AD教程系列 | 4 - 创建集成库文件
Thoughts triggered by the fact that app applications are installed on mobile phones and do not display icons
ECCV 2020 double champion team, take you to conquer target detection on the 7th
Create a binary response variable using the cut sub box operation
6.1 - 6.2 Introduction à la cryptographie à clé publique
Codeforces Round #802 (Div. 2)(A-D)
百度API地图的标注不是居中显示,而是显示在左上角是怎么回事?已解决!
出色的学习能力,才是你唯一可持续的竞争优势
Douban top250
Astype conversion data type
FastAdmin Apache下设置伪静态