PostgreSQL General Operations

Source: Internet
Author: User

    1. Add users other than the Postgres super user.

      CREATEUSER-DRSP TestUser

    2. Create a dedicated database for users

      Createdb-o testuser TestDB


When you back up your data, you should take the Postgres super user to avoid some permission class errors.


SSH Password-free login:

If you want to log on a machine to B:

    1. Generate public and private keys on a machine # ssh-keygen-t RSA

    2. Copy the generated id_rsa.pub public key to Authorized_keys. # CP Id_rsa.pub Authorized_keys

    3. Append the Authorized_keys SCP to the ~/.ssh/directory of Machine B, appended to the existing Authorized_keys file. If not, create one yourself.



The Django error message is as follows:

Integrityerror at (some URL): Duplicate key value violates UNIQUE constraint "Krypdos_value_pkey"

Workaround:

Select Setval (' Tablename_id_seq ', (SELECT MAX (ID) from tablename) +1)


This article is from the "Blue Fin Dolphin" blog, please be sure to keep this source http://likunheng.blog.51cto.com/9527645/1589035

PostgreSQL General Operations

Related Article

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.