Database and method for realizing session-level variable in postgresql database

A database and session-level technology, applied in the database field, can solve problems such as inability to be used by clients, and achieve the effect of improving efficiency, stability and performance assurance

Pending Publication Date: 2021-11-09
HIGHGO SOFTWARE
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Embodiments of the present invention provide a database and a method for implementing session-level variables in a postgresql database, to solve the problem that session-level variables in a postgresql database in the prior art can only be used in the client tool psql, and cannot be used by clients who call the database through an interface end use

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Database and method for realizing session-level variable in postgresql database
  • Database and method for realizing session-level variable in postgresql database
  • Database and method for realizing session-level variable in postgresql database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0021] The embodiment of the first aspect of the present invention proposes a database suitable for running in two working modes.

[0022] The working modes of the database include a first working mode and a second working mode. In the first working mode, the database assigns values ​​to session variables through the "\set variable name value" command, and assigns values ​​to session variables through the ": variable name" command. call session...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a database and a method for realizing a session level variable in a postgresql database, the database comprises a first working mode and a second working mode, wherein in the first working mode, the database assigns a value to a session variable through "\set variable name value" command, and calls the session variable through ":variable name"; and in the second working mode, the database assigns a value to the session variable through a "set@variable name: = value" command, and calls the session variable through a "@variable name" command. According to the invention, the two modes are switched for use during working. Therefore, according to the method, when the database processes the session variable, the working mode more suitable for the session variable is selected, so that the design of the database on the session variable is more efficient and reliable, the compatibility and usability of the database are enhanced, and the migration efficiency of the application is improved.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a database and a method for realizing session-level variables in a postgresql database. Background technique [0002] The sql statements of the existing postgresql database are all executed on the server side, and the connection to the server side is through the client or the client interface such as JDBC. The existing session-level variables can only be used in the client tool psql, not through The interface is used in the client to call the database. Session variables are variables used in the current database session. After the current session ends, the variables will no longer be valid. In psql, first assign a value to a variable through \set. When using a variable, call the variable through ":variable name". The processing of the database when processing the \set command and subsequent variable calling is all on the client. Variables in psql only support changing the val...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F16/242G06F16/22G06F8/41
CPCG06F16/2433G06F16/2255G06F8/427G06F8/425Y02D10/00
Inventor 颜学彪
Owner HIGHGO SOFTWARE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products