使用VSCode时,我的大多数文件都设置为使用空格缩进.但是我有时希望插入一个文字标签.当我使用vim时,我会使用<Ctrl> + v <Tab>,但这不适用于VSCode.
我一直在搜索和搜索,找不到任何东西.请帮忙!
使用Sublime Text 3时,我的大多数文件都设置为使用空格缩进.但是我有时希望插入一个文字标签.当我使用vim时,我会使用<Ctrl> + v <Tab>,但这不适用于Sublime Text 3.
我一直在搜索和搜索,找不到任何东西.请帮忙!
tabs sublimetext sublimetext2 sublimetext3 sublime-text-plugin
如果我有一张桌子
create table foo ( bar text[] not null check ..... );
Run Code Online (Sandbox Code Playgroud)
和一个函数
create function baz(text) returns boolean as $$ .....
Run Code Online (Sandbox Code Playgroud)
如何向 foo 表添加检查约束,以便 bar 字段中的每个元素都验证 baz 函数?
我在想我需要创建一个函数
create function array_baz(arg text[]) returns boolean as $$
with x as ( select baz(unnest(arg)) as s_arg )
select not exists (select 1 from x where s_arg = false)
$$ language sql strict immutable;
create table foo (bar text[] not null check ( array_baz(bar) = true ) );
Run Code Online (Sandbox Code Playgroud)
但是,我确信我在这里重新发明了轮子,并且有一种更可爱的方法来做到这一点。我缺少什么 psql 技巧?地图功能会很好
create …Run Code Online (Sandbox Code Playgroud)