How to add uuid components to PostgreSQL in Linux

Source: Internet
Author: User
Tags psql
Step 4 of sourceetcprofile. Go to supostgres user psql-Upostgres-dmydblt; usrlocalpgsqlsharecontribuuid-ossp. SQL

Source/etc/profile step 4. Enter su postgres user psql-U postgres-d mydb lt;/usr/local/pgsql/share/contrib/uuid-ossp. SQL

Notes

1. find/-name uuid-ossp.so search to see if there is

If not. Click here to download and install uid-1.6.1.tar.gz. Note .. /Configure. The uuid-ossp.so file will exist in/usr/local/lib at this time

2. If an error is reported during postgresql installation.

Checking for uuid_export in-lossp-uuid... no
Checking for uuid_export in-luuid... no
Configure: error: library 'oss-uuid 'or 'uuid' is required for OSSP-UUID"
The UUID package is not installed. That is, the first step is not done well.
./Configure -- with-libxml -- with-ossp-uuid -- with-libs =/usr/local/lib -- with-nodes des =/usr/local/include

In this case, install.

3. Add component

Go to the cd post installation package directory/contrib/uuid-ossp/

Make & make install

4. Configure Environment Variables

/Etc/profile

PGLIB =/usr/local/pgsql/lib
PGDATA = $ HOME/data
PATH = $ PATH:/usr/local/pgsql/bin
MANPATH = $ MANPATH:/usr/local/pgsql/man
Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/local/lib
Export PGLIB PGDATA PATH MANPATH

Source/etc/profile

Step 4.

Enter su ipvs user

Psql-U postgres-d mydb </usr/local/pgsql/share/contrib/uuid-ossp. SQL where

Mydb is a self-built Database

A lot of code is lost.

,

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.