自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

岳麓丹枫

{万法皆空

  • 博客(13)
  • 资源 (10)
  • 问答 (1)
  • 收藏
  • 关注

原创 PG触发器实例

实例create table test(id int,name varchar, create_time timestamp without time zone default now(), modify_time timestamp without time zone );create table tbl_log(id int, log_time timestamp without t...

2019-11-29 14:01:17 673

原创 数据库重新初始化步骤

数据库重新初始化步骤数据库重新初始化步骤数据库重新初始化步骤重新初始化并恢复数据库 步骤:1、停服务vmserver.sh stopall2、新建数据库目录并授权cd /mnt/syncdata/pgsqlmkdir -p data_newchown -R postgres.postgres data_new/chmod 700 data_new3、检查ll...

2019-11-29 10:09:34 4499

原创 PG客户端使用教程

PG客户端使用教程参考:添加链接描述

2019-11-20 19:15:43 1629

原创 删除分表

CREATE OR REPLACE FUNCTION func_drop_unuseful_tbl_bak_file_subtables()RETURNS INTEGERASBODYBODYBODYDECLARErec record;szTableName varchar;BEGINfor rec in select tablename from pg_tables where (...

2019-11-19 21:02:08 189

转载 PG distinct与distinct on

PG distinct与distinct on添加链接描述

2019-11-19 09:12:48 771

原创 PG update from

实例create table ta (id int,name varchar);insert into ta values(1,NULL),(2,NULL),(3,'c');create table tb (id int,name varchar);insert into ta values(1,'a'),(2,'b'),(3,'d');update ta s set nam...

2019-11-15 17:23:44 1634

转载 PG存储过程实例

CREATE TABLE accounts ( id INT GENERATED BY DEFAULT AS IDENTITY, name VARCHAR(100) NOT NULL, balance DEC(15,2) NOT NULL, PRIMARY KEY(id)); INSERT INTO accounts(name,balance)VALUES(...

2019-11-14 21:14:33 1655

原创 PG与json类型

实例1create table test(id int,name varchar);insert into test values(1,'a'),(2,'b');alter table test add col jsonb;update test set col=format('{"id":"%1$s","name":"%2$s"}',id, name)::jsonb;结果:...

2019-11-14 17:15:19 1087

原创 PG将多个记录值通过into设置给一个变量的时候,此时变量会取第一个值,不会报错

直接看例子drop table if exists test;create table test(id int, name varchar);insert into test select n, n||'name' from generate_series(1,10) as t(n);CREATE OR REPLACE FUNCTION func_test()RETURNS IN...

2019-11-05 20:28:49 640

原创 Llinux shell heredoc使用

直接上例子/home/postgres/pgsql/bin/psql -Upostgres -d efc -c "DROP TABLE tbl_event_record_2019_11_03_03"SQL=`cat <<-EOFexplain(verbose, analyse)insert into tbl_event_record(event_id,event_ty...

2019-11-05 18:45:41 607

原创 PG语句级别触发器使用示例

目录构造表与数据drop table if exists ta;drop table if exists tb;create table ta(id int, name varchar);create table tb(id int);insert into ta select n, n || 'name' from generate_series(1, 100, 1) as t...

2019-11-05 18:43:46 721

原创 PG特殊字符的转义

efc=# select tablename from pg_tables where tablename like E'test\_%' and tablename not in ('test','test_defautl'); tablename -------------- test_default testu testu_1 testu_2(4 rows)efc...

2019-11-04 09:21:55 3017

原创 测试

我是一级标题测试一下

2019-11-03 12:00:10 359

datagrip 插件相关

datagrip 插件相关

2022-06-24

mysql_install.sh

基于CentOS7自动化安装MySQL5.7.28脚本

2021-05-09

refman-8.0-en.a4.pdf

mysql8参考手册

2021-04-11

refman-5.7-en.a4.pdf

mysql 5.7参考手册

2021-04-11

grafana-7.5.3.linux-amd64.tar.gz

grafana

2021-04-11

prometheus-2.26.0.linux-amd64.tar.gz

prometheus-2.26.0.linux-amd64.tar.gz 最新版

2021-04-11

PostgreSQL流复制原理

PostgreSQL11.2 中文文档 chm版; PostgreSQL是世界上最强大的开源数据库, 堪比商业版的Oracle,

2020-11-29

oracle rac 2 day&#039;s guide

oracle rac 2 day's guide;oracle rac 安装教程; oracle rac 2 day's guide;oracle rac 安装教程;

2018-02-05

Linux 命令行 - v1.0

Linux 命令行 - v1.0;Linux 命令行 - v1.0;Linux 命令行 - v1.0

2017-12-18

《妙趣横生的算法》源代码

此压缩文档中包含的是《妙趣横生的算法》一书中的源代码,欢迎大家下载并参考、学习!

2017-02-17

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除