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

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

  1. Postgre: 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. 杂项:UUID

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

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

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

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

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

  5. python uuid、hex study

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

  6. UUID(uuid)js 生成

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

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

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

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

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

  9. python 内置模块之hashlib、hmac、uuid

    一.hashlib md5和sha算法通过消息摘要算法生成定长的消息摘要,消息摘要算法是不可逆的.但同一段消息通过摘要算法后得到的值是一样的,可一通过比对消息摘要验证数据的完整性. sha算法比MD5 ...

随机推荐

  1. Animation 的setFillAfter

    疑问:如果图片从其他地方回到原先位置,则setFillAfter(false)也可以保持图片在原先位置?

  2. 浅谈HTML之模仿人人网登陆界面(新手必学)

    为方便大家对web相关知识的了解,现谈谈新手如何从HTML css  Javascript到以后后台的发展.首先,让大家看看HTML仿人人登陆界面: <!doctype html> < ...

  3. Gora_百度百科

    Gora_百度百科     Gora    编辑    目录         1什么是Apache Gora         2为什么要使用Apache Gora         3Gora的一个源代 ...

  4. 基于visual Studio2013解决C语言竞赛题之1042字符串比较

          题目 解决代码及点评 /********************************************************************** ...

  5. 基于visual Studio2013解决C语言竞赛题之1041反向打印

          题目 解决代码及点评 /* 功能:将一个整数(最多是10位数)从低位到高位打印出来, 如该数是12345时,输出应是54321(只占一行) 时间:19:18 201 ...

  6. 教师简介 (Alma Del Tango的小站)

    教师简介 (Alma Del Tango的小站) Esteban Peng (TT) & Emilia Jia (Amy) TT和Amy是北京极具影响力的专业舞者,他们从07年开始推广阿根廷探 ...

  7. PAT 1002 Hello World for U (20)

    Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. ...

  8. 时间戳timestamp

    1 时间戳 数据库中自动生成的 唯一的 二进制的数据,通常用作给数据表的行添加版本戳的机制. timestamp与时间和日期无关. timestamp存储大小为8字节. 一个数据表只能有一个times ...

  9. 网页调试技巧:抓取马上跳转的页面POST信息或者页面内容

    http://www.qs5.org/Post/625.html 网页调试技巧:抓取马上跳转的页面POST信息或者页面内容 2016/02/02 | 心得分享 | 0 Replies 有时候调试网页或 ...

  10. 基于visual Studio2013解决C语言竞赛题之1080填运算符

        题目 解决代码及点评 /************************************************************************/ /* ...