How does Django use snowflake to generate a primary key instead of automatically?

Before, ID was implemented with auto increment. Now I want to use Snowflake algorithm to generate primary key. What changes should I make? catalog Background Implementation plan Scenario 1 - add primary key manually Scenario 2 - override save() method Scenario 3 - using pre in Django Signals_ save() ...

Posted by ivi on Wed, 17 Jun 2020 08:11:54 +0200

pg12 new features - monitoring database activity

PostgreSQL can report the progress of some commands during command execution. Currently, the commands that support progress reporting are CREATE INDEX, VACUUM and CLUSTER. This range may be expanded in the future. CREATE INDEX Whenever an index is created or REINDEX is run, the PG > stat > progress > create > index view will contain ...

Posted by cloudhybrid on Mon, 27 Apr 2020 16:04:04 +0200

Redash - a powerful open source data visualization platform

We will often mention BI system (Business Intelligence), which is an important data entry and exit to help data and enterprises to obtain data reports and make strategic decisions. We are familiar with FineBI and Microsoft's powerBI, but the cost of using them is not low, the client is needed for authorization, and the configuration of using t ...

Posted by SephirGaine on Wed, 22 Apr 2020 04:22:26 +0200

Installation and configuration of Postgresql9.6.6 under CentOS 6.6

1, Environment introduction System platform: CentOS release 6.6 (Final) Postgresql: postgresql-9.6.6 SELINUX=disabled Iptables off 2, Installation process 1. Install dependency package yum -y install gcc* yum -y install readline-devel 2. Source package acquisition wget http://ftp.postgresql.org/pub/source/v9.6. ...

Posted by batterdmooie on Sat, 04 Apr 2020 10:11:46 +0200

Using JPA + eclipse link to operate PostgreSQL database

First, make sure you have PostgreSQL installed. You can refer to my article PostgreSQL literacy tutorial. Create a new JPA project using Eclipse: The Platform selects eclipse link as one of the provider s of JPA. The automatically generated project in Eclipse is shown below: Overwrite the automatically generated xml with the contents of the ...

Posted by rubenc on Thu, 19 Mar 2020 16:55:47 +0100

PG database kernel analysis learning notes log recovery strategy

PG database kernel analysis learning notes log recovery strategy In PostgreSQL, the StartupXlog entry function is called when the system restarts after a crash // xlog.c /* * This must be called ONCE during postmaster or standalone-backend startup */ void StartupXLOG(void) { XLogCtlInsert *Insert; ...

Posted by trouble706 on Mon, 17 Feb 2020 11:05:04 +0100

Making clear of hive window function

1 Definition Window function, also known as analysis function Analytic functions compute an aggregate value based on a group of rows. They differ from aggregate functions in that they return multiple rows for each group. The group of rows is called a window and is defined by the analytic_clause.Th ...

Posted by xsgatour on Thu, 06 Feb 2020 15:06:54 +0100

PostgreSQL database full database backup script

# PostgreSQL database full database backup script #Author: old farmer (Liu Qihua) #QQ: 46715422 #Email: 46715422@qq.com #Wechat: 46715422 Test operating system environment: CentOS 6/7, Debian 8/9, FreeBSD 11/12 Test PostgreSQL version: 11 beta3 User name and password: postgres The database we need to back up this time: test Script requ ...

Posted by Thierry on Wed, 01 Jan 2020 01:06:04 +0100

Geometry types in PostgreSQL

PostgreSQL mainly supports some two-dimensional geometric data types, such as point, line, lseg rectangle, path, polygon, circle, etc. This article will introduce the input of geometry type in detail. Note: each type has several equivalent input forms. 1. point select '1,1'::point; select '(1,1)'::point;    2. line select ...

Posted by swebajen on Tue, 17 Dec 2019 17:02:53 +0100

Using application program (Java/Python) to access MaxCompute Lightning for data development

MaxCompute Lightning It is an interactive query service of maxcompute products. It supports accessing the maxcompute project through PostgreSQL protocol and syntax connection. It enables you to use familiar tools to query and analyze the data in the maxcompute project with standard SQL, and quickly obtain the query results.Many developers want ...

Posted by BobRoberts on Tue, 03 Dec 2019 00:51:50 +0100