权限相关:
# 创建schema
create schema demo;
# 创建用户
create user demoUser with password '123456'
# 将 demo 的 schema 的所有者给到 demoUser
alter schema demo owner to demoUser;
# 授权权限
grant select,insert,update,delete on all tables in schema demo to demoUser;
# 查询用户相关表
select * from pg_tables where schemaname not in ('pg_catalog','information_schema')
# 修改PostgreSQL密码,username是需要修改密码的用户账户的名称,new_password是需要设置的新密码。
ALTER USER username WITH PASSWORD 'new_password';
# 忽略前五个
select * from 表 offset 5
# like 不区分大小写
select * from 表 where name ilike 'J%'
# like 区分大小写
select * from 表 where name like 'J%'