Let me start with a bit of chatter. I've been working happily with MySQL, a time-tested old friend. But since the understanding of a little PostgreSQL, it is fascinated by its rich functional characteristics. For example, field types natively
The view log finds the following error message:%t log:could not receive the data from Client:an operation were attempted on something this is not a socket.According to the error, found the answer on HP's official website (should be win's question,
Create a databaseCREATE DATABASE Test with OWNER = postgres ENCODING = ' UTF8 ';Enter the console method to execute the command under the installation purpose bin of PostgreSQL: Psql database name,Example:/usr/local/pgsql/bin/psql mydbSpecify host,
Recently learning hibernate, the common tutorial is to go with MySQL, because the company's local computer with PG, so try to do a PG small demo. He is also learning to write, only to deepen the impression. Words do not say much, direct start;A)
1.int Pack StringSelect CAST (1234 as text)Select to_char (1234, '9 ')2.string Turn intCast (asNUMERIC)--5 attached: PostgreSQL type conversion function
Function
Return Type
Description
Example
2016-09-01 22:48:20+08 published translation: Kingston Small @ Flying Elephant dataSeptember 1, 2016, the PostgreSQL global development team announced the PostgreSQL9.6 first RC candidate release for download. This RC version contains the new
Installing PostgreSQLWhether the master-slave must be divided into two machines, master and slave should be the same version, or start will error.3. Configure the master databaseSu–postgres/usr/local/pgsql/bin/pg_ctl–d/data/pgsql9.1 Start
1. Find the location of PostgreSQL configuration file postgresql.conf2, modify the inside of a parameter,Max_connections =# (change requires restart)The default value is 100, which is changed to the value you need.3, after the change restart,
First, installation1, Installation: Use the following command, will automatically install the latest version, here is 9.5sudo Install PostgreSQLWhen the installation is complete, a default database account named "Postgres" with no password is
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
1. Left JOIN or RIGHT Join When a database returns records by connecting two or more tables, an intermediate temporary table is generated, and the temporary table is returned to the user. 2. Processing JSONOfficial explanation address
1. Useful LinksPostgreSQL Common small functionssome string manipulation functions of the PostgreSQL databasefunction called in PostgreSQL functionPostgreSQL Learning Manual (Functions and Operators )A simple way to get started with PostgreSQL
In PostgreSQL ,user is a reserved word. If you want to create a user table, you may encounter some problems! As you can see, there is no way to create a user table .You might say, I just don't have a double quote "" to enclose the uppercase table
-- defining triggers CREATE TRIGGER INSERT on "public". vss_passenger_flow_201702 " for each ROWEXECUTEPROCEDURE " Vss_after_ Insert_flow "();-- Delete Trigger DROP TRIGGER on vss_passenger_flow_201702;--Defining stored Procedures--FUNCTION:public.
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
Pg_dump backup data-- You only need to enter the name of the database to be exported after the command prompt to back up the database, as shown in the following example (change the PostgreSQL path based on your own installation path ): The code is
1. Use EXPLAIN:PostgreSQL generates a query plan for each query, because selecting the correct query path has a critical impact on performance. PostgreSQL itself contains a scheduler for optimal planning. We can use the EXPLAIN command to view the
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