The Drop Command (Commands) implements:/* * Drop one or more objects. * * We don ' t currently handle all object types here. Relations, for example, * require special handling, because (for example) indexes has additional * locking requirements. *
Often encounter an application scenario that summarizes, compares, and sorts the contents of some rows.such as the data table name Test.test2Select from Test.test2Get results:1828;"Heilongjiang"137;"Heilongjiang"184;"Heilongjiang"183;"Fujian"
To modify the listening parameters in the service configuration file postgresql.confThe default profile is in the Pgdata directory (except that you specify it through the parameter Config_file in the service process) [[email protected] data]$ vi
Pg_hba.conf is a client authentication configuration fileMETHOD specifies how the client's authentication is handled. Commonly used are ident,md5,password,trust,reject.PostgreSQL only listens to local ports by default, and Netstat-tuln only sees
Add users other than the Postgres super user.CREATEUSER-DRSP TestUser
Create a dedicated database for usersCreatedb-o testuser TestDB
When you back up your data, you should take the Postgres super user to avoid some permission class
Here I would like to demonstrate how to achieve the cross-table in PostgreSQL display, as to what is a cross-table, I will not say, the degree Niang go oh.The original table data is as follows:t_girl=# select * from score; name | subject | score - -
About the use of PostgreSQLPlatform: Ubuntu 12.04 & 14.04Version: PostgreSQL 9.3.4 PostgreSQL installationSee website installation process Add userAfter initial installation, a database named Postgres and a database user named Postgres are generated
Create a new instance, (the 9.1 version used below, if it is a different version, you can replace 9.1 with the version number)sudo/usr/bin/Pg_createcluster-U postgres # #系统用户-D/VAR/LIB/POSTGRESQL/9.1/D1 # #实例目录, version-S/VAR/RUN/PGD1 # #--local
Export the database data1 to a file in the shell with Command pg_dumppg_dump-d data1-f Test.txtOrpg_dump-d data1 > Test.sqlAnd then create an empty libraryCreatedb data2Import data1 data into data2 with the Psql commandpsql-d data2-D data2 Pg_dump
From MARSPRJ0. Compiling the Environment
Linux:centos 5.5
gcc:4.1.2
1. Installing PostgreSQL1) Unzip the POSTGRESQL-9.1.7.TAR.BZ2#tar JXVF postgresql-9.1.7.tar.bz22) Enter the postgresql-9.1.7 directory after decompression#cd
1. Size differenceExecuting on the main librarySelect Application_name, Pg_size_pretty (Pg_xlog_location_diff (Pg_current_xlog_location (), replay_location)) As Difffrom pg_stat_replication;Or:selectapplication_name,client_addr,cur_xlog | | '/' |
Prepare a line SHP data and import it into the postgres inside, postgres install PostGIS and pgrouting two plugins (see http://www.cnblogs.com/nidaye/p/4553522.html for a method). The fields of the line data are as follows: note the name of the
PostgreSQL Chinese Information SummaryAt present PostgreSQL Chinese information is very short, there are many netizens struggling to get started with less Chinese information, here to collect the following, convenient to have friends, reduce the
Because of work needs, in the new project need to use PostgreSQL-8.1.5; although previously configured, but this configuration but found that the new version and the original has a lot of different places.
I will not discuss the differences here. I
I. Basic concepts:
SQL functions can contain any number of queries, but the function returns only the results of the last query (which must be select. In simple cases, the first row of the last query result is returned. If no row is returned for
① To The http://www.postgresql.org/download the no installer version of postgresql for win. The latest version is 8.2.5-1. Directly decompress the package. For example:C: \ PostgreSQL② Set Environment VariablesC:> set pghome = c: \ PostgreSQLC:> set
Environment: centos 6.3 minimizes the default installation and configures the NIC.
Before installing PostgreSQL, check that the Internet connection is normal to download the installation file.
Use the Yum-y update command to upgrade the system
Document directory
PostgreSQL cluster replication Solution
About pgq and londiste tools
Install
Configuration
Start replication daemon
Add a replica set
Test conclusion
Exploration of application scenarios
PostgreSQL cluster replication
In the process, npostgres.exe (this is normal, see the official documentation), but one is always full of CPU (because the local machine is dual-core and occupies 50% of the resources ). The built-in pgAdmin III connection will die.
No answers are
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