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.

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() ;

Postgre: How to import UUID function into Postgre 9.3的更多相关文章

  1. HOW TO: How to import UUID function into Postgre 9.3

    1. Open a command console and go to the directory where you installed Postgre server. e.g. D:\Progra ...

  2. 我的一次Postgre数据库Insert 、Query性能优化实践

    一.前言 以前的系统由于表设计比较复杂(多张表,表与表直接有主从关系),这个是业务逻辑决定的. 插入效率简直实在无法忍受,必须优化.在了解了Postgre的Copy,unlogged table 特性 ...

  3. 杂项:UUID

    ylbtech-杂项:UUID UUID 是 通用唯一识别码(Universally Unique Identifier)的缩写,是一种软件建构的标准,亦为开放软件基金会组织在分布式计算环境领域的一部 ...

  4. pytest fixture中scope试验,包含function、module、class、session、package

    上图是试验的目录结构 conftest.py:存放pytest fixture的文件 import uuid import pytest @pytest.fixture(scope="mod ...

  5. python使用uuid库生成唯一id

    概述: UUID是128位的全局唯一标识符,通常由32字节的字符串表示. 它可以保证时间和空间的唯一性,也称为GUID,全称为: UUID -- Universally Unique IDentifi ...

  6. python uuid、hex study

    由 import uuid product[“SourceInfo"]["ProductID"] = uuid.uuid4().hex 引起的uuid 一.概述 uuid ...

  7. UUID(uuid)js 生成

    全局唯一标识符(GUID,Globally Unique Identifier)也称作 UUID(Universally Unique IDentifier) . GUID是一种由算法生成的二进制长度 ...

  8. 【Python】Django Model 怎么使用 UUID 作为主键?

    >>> import uuidprint uuid.uuid3(uuid.uuid1(), 'python.org') >>> # make a UUID base ...

  9. Python使用UUID库生成唯一ID(转)

    原文:http://www.cnblogs.com/dkblog/archive/2011/10/10/2205200.html 资料: Python官方Doc:<20.15. uuid — U ...

随机推荐

  1. make cmake gcc 间的关系

    看了一些关于make  cmake gcc间关系的帖子,其中这一篇简单明了. 作者:辉常哥链接:https://www.zhihu.com/question/36609459/answer/89743 ...

  2. 第四节基础篇 - SELECT 语句详解

    4.1 基本的SELECT语句 select * from T_WEATHER select cityname from t_weather 4.2 数学符号条件(>.<.>=.&l ...

  3. 浙大patB习题的一点总结

    嘛嘛,patB的习题已经结束了,这些基本上没有啥特别难的,但还是有几道特别坑爹的题(o(╯□╰)o),还是把这些题的代码打包上传吧.

  4. 浏览器控制台调试json数据

    var str ='{"code":0,"message":"","systemTime":"2017-10- ...

  5. 解决com.fasterxml.jackson.databind.JsonMappingException: No suitable

    原因:直接翻译,json格式,不匹配. 这原因坑爹啊,因为json格式不正确算一种原因. 还有一种就是接收的bean没有getter,setter方法. 最坑的一种就是数据无法被反序列化,list,m ...

  6. vue-router实现登录和跳转到指定页面,vue-router 传参

    定义路由的时候可以配置 meta 字段: const router = new VueRouter({ routes: [ { path: '/foo', component: Foo, childr ...

  7. Linux的哲学思想

    1.一切皆文件:2.单一目的的小程序:3.组合小程序完成复杂任务:4.文本文件保存配置信息:5.尽量避免捕获用户接口:6.提供机制,而非策略. 说到底Linux的哲学思想在于方便和更好的管理后台,不同 ...

  8. 81. Search in Rotated Sorted Array II (中等)

    Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e. ...

  9. sourceTree+gerrit管理代码

    第一次接触gerrit,会对这种代码管理方式非常排斥,尤其是习惯了用sourceTree配合git进行代码管理的同学.不爽归不爽,代码还得写,我们的目标是让开发过程爽起来. 关于gerrit的知识,移 ...

  10. Linux服务器搭建相关教程链接整理

    Linux: Linux 教程 | 菜鸟教程 linux下如何添加一个用户并且让用户获得root权限 - !canfly - 博客园 Git: 在 Linux 下搭建 Git 服务器 - 黄棣-dee ...