Postgresql has a lot of built-in practical functions. Here are the combination and cutting functionsEnvironment: PostgreSQL 9.1.2 CENTOS 5.7 final 1, Combined function1.concat a. Grammar introductionconcat(str "any" [, str "any" [, ...]])
Concatenate all but first arguments with separators.
The first parameter is used ...
Added by Joshv1288 on Wed, 01 Apr 2020 13:52:01 +0300
Author: Yang Taotao
Senior database expert, specializing in MySQL for more than ten years. Good at mysql, PostgreSQL, MongoDB and other open-source database related backup and recovery, SQL tuning, monitoring operation and maintenance, high availability architecture design, etc. At present, he is working in aikesheng, providing MySQL related ...
Added by akop on Wed, 25 Mar 2020 11:15:53 +0200
Absrtact: This article mainly talks about how to add a configuration option for the auto precompiled script configure in the source code of Postgresql and find a simple example to illustrate. In the src/include/storage/proc.h header file, add an array of bytes occupied by the PGXACT structure.
1. First, take a look at a pic ...
Added by olsrey on Wed, 22 Jan 2020 17:46:30 +0200
os: ubunbu 16.04
Under the premise that the production environment ensures the stability of the network, the database can auto failover is the best state. For synchronous replication, it is recommended to configure two Slavs. For asynchronous replication, ...
Added by lasse48 on Wed, 25 Dec 2019 22:35:37 +0200
Use PostgreSQL 11.3 to create two nodes: node1 and node2; configure master-slave stream replication, and then make a manual switch (failover). To simplify the configuration process, two nodes are on the same physical machine.
First, the master-slave synchronous flow replication is established. At first, node1 is the Primary node and ...
Added by RedMaster on Tue, 19 Nov 2019 17:58:44 +0200
Pre match blur
Using B-Tree to speed up matching fuzzy query before optimization
Create a new product table and insert 10 million pieces of data.
create table goods(id int, name varchar);
insert into goods select generate_series(1,10000000),md5(random()::varchar);
Query the product name of "123%" when the index is not ...
Added by DaPrince on Thu, 31 Oct 2019 22:46:18 +0200
Usually when we refer to database table structure, we are concerned about several attributes:Field name, type, length, whether primary key, whether self-increasing, whether empty, default value, notes.So, what are the properties of using SQL statements to get these attributes under the mainstream databases?
As the most popular da ...
Added by sylesia on Wed, 09 Oct 2019 03:43:58 +0300
Pg_stat_states is an extension plug-in of PostgreSQL database, which is used to collect the running information of SQL in the database, such as the total execution time of SQL, the number of calls, the hit rate of shared memory and so on. Used to monitor the performance of database is an important expansion module of database performanc ...
Added by sn0n on Tue, 27 Aug 2019 11:35:41 +0300
PostgreSQL, json, string escape, unicode, SQL injection, backslash_quote, escape_string_warning, standard_conforming_strings
Through this article, you can understand:
1. How to input special characters in a string, such as carriage return.
2. How to enter single quotation marks in a string.
3. What is an escape character? Us ...
Added by primefalcon on Sun, 14 Jul 2019 00:59:38 +0300
PostgreSQL, 10.0, sharding, distributed transaction, 2pc, two-phase transaction
As a complete distributed database (sharding), it is not possible without distributed transaction support.
What is distributed transaction? For example, we compare a database to a child, each child has 100 yuan, and then children A give children ...
Added by JayBachatero on Sun, 14 Jul 2019 00:35:29 +0300