HOW TO: How to import UUID function into Postgre 9.3
2014-11-12 17:52
399 查看
1. Open a command console and go to the directory where you installed Postgre server.
e.g. D:\Program Files\PostgreSQL\9.3\bin>
2. Drill down into BIN folder and issue following command.
3. Issue CREATE EXTENSION command to import extension
NOTICE: There is a semicolon at the end of command.
4. After above steps, you can check if the extension has been imported successfully by calling following command.
5. If succeed, you should be able to see the list as below.
extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
-----------+----------+--------------+----------------+------------+-----------+--------------
plpgsql | 10 | 11 | f | 1.0 | |
uuid-ossp | 89286 | 2200 | t | 1.0 | |
6. Now, you may generate UUID by uuid_generate_v4()
e.g. D:\Program Files\PostgreSQL\9.3\bin>
2. Drill down into BIN folder and issue following command.
psql -d <database name> -U <username>
3. Issue CREATE EXTENSION command to import extension
CREATE EXTENSION "uuid-ossp" ;
NOTICE: There is a semicolon at the end of command.
4. After above steps, you can check if the extension has been imported successfully by calling following command.
select * from pg_extension;
5. If succeed, you should be able to see the list as below.
extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
-----------+----------+--------------+----------------+------------+-----------+--------------
plpgsql | 10 | 11 | f | 1.0 | |
uuid-ossp | 89286 | 2200 | t | 1.0 | |
6. Now, you may generate UUID by uuid_generate_v4()
select uuid_generate_v4() ;
相关文章推荐
- HOW TO: How to import UUID function into Postgre 9.3
- Postgre: How to import UUID function into Postgre 9.3
- How to import existing projects into TFS Visual Studio with GIT ?
- How to import Gradle project into eclipse .
- 如何导入SEPM没有的安装包 How to manually import a client packages into SEPM 12.1
- How to import Ocx into MFC project
- How to import the Spring Framework sourcecode into Eclipse
- How to import xml data into excel
- How to import existing GIT repository into another?
- STL template&Container--how to change normal function into generic function.
- How to import a static library into your test project?
- How to import OpenStreetMap data into PostgreSQL
- [Android] How to import library into android studio
- [转]How to Import a Text File into SQL Server 2012
- How to pass the paramater of Node.js or io.js into native C/C++ function.
- How to import products into Magento?
- How to Import Products into Magento
- How to import a SQL Server .bak file into MySQL?
- How to pass the paramater of Node.js or io.js into native C/C++ function.
- How to Manually import transports into SAP without using command line TP