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. WinForm - 格式化DataGridView单元格数据

    效果: 代码: /// <summary> /// 格式化数据 /// </summary> private void dataGridView1_CellFormatting ...

  2. [C#] 网页Html转PDF档(一行程式码解决)

    原文 [C#] 网页Html转PDF档(一行程式码解决) 网页转PDF档做法很多( Convert HTML to PDF in .NET ) 这边纪录一下老外最多人加分的那篇做法,使用wkhtmto ...

  3. jetty插件开发配置

    <plugins> <!-- jetty插件 --> <plugin> <groupId>org.mortbay.jetty</groupId&g ...

  4. UTL_RAW

    The UTL_RAW package provides SQL functions for manipulating RAW data types. 该包的功能其实可以用来加密: SELECT    ...

  5. Kivy: Crossplatform Framework for NUI

    Kivy: Crossplatform Framework for NUI ivy - Open source Python library for rapid development of appl ...

  6. 分享一个嵌入式httpdserver开发库 - boahttpd library

    http://sourceforge.net/projects/boahttpd/ 一个C接口的开发库,适用于 windows/linux/或其它嵌入式平台,支持CGI扩展,支持多线程.採用面向对象开 ...

  7. C#中对文件的操作

    详细介绍参考:http://blog.csdn.net/wangyue4/article/details/4616801 源码举例: public class FileSystemManager { ...

  8. js打印

    js打印,其实是打印当前页面的内容,是调用 系统的js方法,来弹出 打印设置窗口,用法很简单. window.print()就行,有的考虑到 浏览器兼容性问题,会用到document.execComm ...

  9. FastDFS的学习与使用(大量帖子)

    http://www.oschina.net/p/fastdfs http://bbs.chinaunix.net/forum-240-1.html

  10. js实现图片上传预览及进度条

    原文js实现图片上传预览及进度条 最近在做图片上传的时候,由于产品设计的比较fashion,上网找了比较久还没有现成的,因此自己做了一个,实现的功能如下: 1:去除浏览器<input type= ...