当前位置:网站首页>PostgreSQL里有只编译语句但不执行的方法吗?
PostgreSQL里有只编译语句但不执行的方法吗?
2022-07-25 17:06:00 【DarkAthena】
对应SQL SERVER中的SET NOEXEC ON的功能。
采纳答案1:
https://stackoverflow.com/questions/8271606/postgresql-syntax-check-without-running-the-query/13209943
这个问答里有不少方案,其中最简单的就是写个匿名块,然后第一条执行的就是return,后面放你要验证的代码
DO $SYNTAX_CHECK$ BEGIN RETURN; -- insert your SQL code hereEND; $SYNTAX_CHECK$;
或者使用其他回答中的插件及小工具
其他答案1:
https://stackoverflow.com/questions/8271606/postgresql-syntax-check-without-running-the-query/13209943
这个问答里有不少方案,其中最简单的就是写个匿名块,然后第一条执行的就是return,后面放你要验证的代码
DO $SYNTAX_CHECK$ BEGIN RETURN; -- insert your SQL code hereEND; $SYNTAX_CHECK$;
或者使用其他回答中的插件及小工具
其他答案2:
不是过程,函数之类的呀
边栏推荐
- ReBudget:通过运行时重新分配预算的方法,在基于市场的多核资源分配中权衡效率与公平性
- Birui data joins Alibaba cloud polardb open source database community
- 第五章:流程控制
- Enumeration classes and magic values
- Outlook tutorial, how to search for calendar items in outlook?
- 【obs】转载:OBS直播严重延迟和卡顿怎么办?
- Using rank to discuss the solution of linear equations / the positional relationship of three planes
- Rosen's QT journey 99 QML table control tableview
- Roson的Qt之旅#100 QML四种标准对话框(颜色、字体、文件、提升)
- [book club issue 13] +ffmpeg open source project
猜你喜欢

Replicate swin on Huawei ascend910_ transformer

EasyUI drop-down box, add and put on and off shelves of products

Bo Yun container cloud and Devops platform won the trusted cloud "technology best practice Award"

QT listview list display component notes

Step by step introduction of sqlsugar based development framework (13) -- package the upload component based on elementplus, which is convenient for the project

Hcip notes 11 days
![Sogou batch push software - Sogou batch push tool [2022 latest]](/img/87/d89c8d301743d1087d001a4f97de02.jpg)
Sogou batch push software - Sogou batch push tool [2022 latest]

一百个用户眼中,就有一百个QQ

Random talk on generation diffusion model: DDPM = Bayesian + denoising

Chapter III data types and variables
随机推荐
[cloud co creation] explore how gaussdb helps ICBC create core financial data
[knowledge atlas] practice -- Practice of question and answer system based on medical knowledge atlas (Part5 end): information retrieval and result assembly
China's chip self-sufficiency rate has increased significantly, resulting in high foreign chip inventories and heavy losses. American chips can be said to have thrown themselves in the foot
企业直播风起:目睹聚焦产品,微赞拥抱生态
简述redis集群的实现原理
Briefly describe the implementation principle of redis cluster
[book club issue 13] +ffmpeg video capture function
Go language series: where does go come from and where will go?
Is it safe to open a securities account in Huatai VIP account
Test framework unittest test test suite, results output to file
中国芯片自给率大幅提升,导致外国芯片库存高企而损失惨重,美国芯片可谓捧起石头砸自己的脚...
152. Product maximum subarray
Replicate swin on Huawei ascend910_ transformer
霸榜COCO!DINO: 让目标检测拥抱Transformer
【redis】redis安装
Chapter III data types and variables
虚拟内存管理
Chapter VI succession
C # introductory basic tutorial
Headless mode of new selenium4.3 in egde browser