1. Prepare
Create a base table first:
CREATE TABLE mytb1 (ID serial,name character varying,age integer);To create an index on the name field:
Create INDEX Mytb1_name_index on MYTB1 (name);
To view the MYTB1 table structure:
postgres=# \d mytb1;
Java is used to develop PostgreSQL database compatibility applications, which is different from Oracle:
Oracle JDBC driverProgramThe Java string type can be properly mapped to the numberic (integer) of the database, while the Postgres will fail.
I. INTRODUCTION to psql is a PostgreSQL command line interactive client tool, similar to the command line tool sqlplus: 1 in Oracle allows you to interactively type SQL or commands, then they are sent to the PostgreSQL server, and then the SQL or
database table has not null,default,check,unique,primary key,foreign KEY six kinds of constraints.A, NOT NULL----non-null constraintNULL indicates no data and does not represent a specific numeric value, so null in the database is not equal to NULL.
PostgreSQL uses dblink to implement cross-database query. postgresqldblink
A recent SQL statement involves joint queries between tables in different databases.
At the beginning, I learned how to write SQL statements, but failed to execute them. I
PostgreSQL Basic Command operation:Login database:[Email protected] ~]$ psql-utestwjw-h 127.0.0.1-dpostgres-p 36985Password for user testwjw:Psql.bin (9.5.9)Type ' help ' for help.Postgres=>To switch databases:Postgres=> \c TESTDB1Connected to
one of the ways that PostgreSQL master-slave replication is implemented:Standby-based asynchronous stream replication, which is a nice feature provided after the postgresql9.x version (2010.9), similar functionality is available in Oracle after 11g
SOURCE side to open the target of the relevant access rights target: 1. Create a view of the remote table create view V_bill_tbl_version_update_control_info as SELECT * from Dblink (' hostaddr= 10.10.10.8 port=4321 dbname=postgres user=postgres
PureftpdIt is an open source code software that is used on multiple types of Unix and complies with the GPL protocol. The following describes how he and PostgreSQL are used in combination.
First, we should know what PostgreSQL is? PostgreSQL is an
Since all relevant report data of AEP EPM (Application run log, call list, session list), configuration information, etc. exist on the local PostgreSQL, understand the basic usage of PostgreSQL and help to improve the daily operation and maintenance
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.