Two method and operation example of PostgreSQL connection data

The code is as follows Copy Code $PG = @pg_connect ("Host=localhost user=postgres password=sa Dbname=employes")Or Die ("can ' t connect to database.");$query = "SELECT * from Employes order by Serial_no"; $query = "INSERT into

Initial knowledge of PostgreSQL stored procedures _postgresql

What is stored procedure, Baidu Encyclopedia is so defined: the stored procedure (Stored Procedure) is in the large database system, a set of SQL statements to complete a specific function, stored in the database after the first compilation after

PostgreSQL kernel parameters and configuration script sharing that need to be modified in CentOS _postgresql

When PostgreSQL is deployed on CentOS, some operating system parameters need to be set up, and some of the official documents are listed (portal). In addition to these, there are other settings, such as the maximum number of processes allowed by a

How PostgreSQL database Implements crosstab

Here I will demonstrate the postgresql inside how to achieve the display of the cross table, as to what is the cross table, I do not say more, the Niang go Oh.The original table data is as follows:Click (here) to collapse or opent_girl=# select *

A summary of several examples of PostgreSQL database to realize factorial method

PostgreSQL function is huge, to realize multiplication such operations have a lot of methods, today I would like to simply enumerate the following several convenient ways.Like we're going to count 10!1, you can use SQL to expand it:t_girl=# Select 1*

What is PostgreSQL?

PostgreSQL is an object-relational database management system (ORDBMS) based on the POSTGRES, Version 4.2, developed by the University of California, Berkeley computer department. Many of POSTGRES's leading concepts only appear in the business

When PostgreSQL's case

Select TT.Dict_labelAs Display_item, T1.ratioFrom(Select T.Product_level,RoundSumCase when T.detect_result=' 2 'Then1Else0End)::numeric/Count1)::NUMERIC,4)As ratiofrom T_detect_record t where t.district= ' 3 ' and t.e_commerce_platform= group by

PostgreSQL allows remote access to configuration modifications

Changes in two places:1.postgresql.confThe Listen_addresses key value is set to "*" and in 9.0 Windows Edition, the item configuration is "*" without modification.2.pg_hba.confThe following configuration is added under host all 127.0.0.1/32 MD5

2017.7.7 PostgreSQL performs updates when insertions cause duplicates

Reference from: https://stackoverflow.com/questions/1109061/insert-on-duplicate-update-in-postgresql/1109198#1109198Functional requirements: The interface definition contains the field update, and when it is true, there is a record in the bulk

PostgreSQL Configuration Installation

MAC Installationhttp://postgresapp.com/Create and delete database usersThe corresponding commands are as follows (in the postgres=# environment):1. View the list of database users:\du2. Create a database User:create user user1 with password ‘123456‘;

PostgreSQL configuration file optimization

Http://www.cnblogs.com/mywebnumber/p/5826795.htmlThe default configuration profile is the postgresql.conf file that is saved in the/etc/postgresql/version/main directoryIf you want to see if the parameter modification takes effect, you can use Psql

PostgreSQL Gets the table name, field name

PostgreSQL gets all the table names in the database:SELECT TableName from Pg_tables WHERE not like ' pg% ' and not like ' sql_% ' ORDER by TableNamePostgreSQL Gets the annotation information for all table names and table in the database:

PostgreSQL Error Handling

Psql: Cannot join to server: No file or directoryWhether the server is running locally and is in a Unix domain socketReady to accept joins on "/var/run/postgresql/.s.pgsql.5432"?[email protected]:/$ sudo service PostgreSQL startFailed to start

PostgreSQL sequence Use

The generation of primary keys in the database is usually generated by sequence, and the sequence knowledge of PG is mainly listed as follows:How to find the name of the sequence: Open the current database with Pgadmin, find the relevant sequence

Installing PostgreSQL's trampled pits

PG Installation Related1 settings for the system languageThe installation of PG, and the locale settings of the system have a certain relationship, need to set, such as in . profile or . BASHRC You can also run the following

The sequence of PostgreSQL sequence

PostgreSQL uses sequences to generate values for serial columns and serial columns be generally what's used for "AUTO-INCR ementing "columns in PostgreSQL. Sequences has names and is, in general, independent of any particular table so you could has

PostgreSQL string intercept substitution

Initializing the databaseCREATE TABLE Public.t1(Name text)Name-------"David""Peter""Task 2016-09-10 10:09:00""Task 2016-10-10 12:03:00""Task 2016-12-22 14:10:00"Replace the record containing "task" with "job"Update T1 set name= ' Job ' | | SUBSTRING

PostgreSQL C Library Use

#include #include int main () { int lib_ver = Pqlibversion (); printf ("Version of LIBPQ:%d\n", lib_ver); return 0;}All:gcc-o ex_02.exe ex_02.c-i "D:/program files/postgresql/9.5/include"- L "D:/program Files/PostgreSQL/9.5/lib"

PostgreSQL modifies the maximum number of connections

1. Suitable maximum number of connectionsUsed_connections/max_connections is around 85%.2. Modify the maximum number of connectionsPostgreSQL Maximum number of connections defaults to 1001) Open PostgreSQL configuration

How to install and configure CentOS7 PostgreSQL

Install yumYum install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-1.noarch.rpmYum install postgresql94-server postgresql94-contribSet startupSystemctl enable postgresql-9.4.serviceSystemctl start

Total Pages: 77 1 .... 64 65 66 67 68 .... 77 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.