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:\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
1. Open a command console and go to the directory where you installed Postgre server. e.g. D:\Progra ...
- 杂项:UUID
ylbtech-杂项:UUID UUID 是 通用唯一识别码(Universally Unique Identifier)的缩写,是一种软件建构的标准,亦为开放软件基金会组织在分布式计算环境领域的一部 ...
- pytest fixture中scope试验,包含function、module、class、session、package
上图是试验的目录结构 conftest.py:存放pytest fixture的文件 import uuid import pytest @pytest.fixture(scope="mod ...
- python使用uuid库生成唯一id
概述: UUID是128位的全局唯一标识符,通常由32字节的字符串表示. 它可以保证时间和空间的唯一性,也称为GUID,全称为: UUID -- Universally Unique IDentifi ...
- python uuid、hex study
由 import uuid product[“SourceInfo"]["ProductID"] = uuid.uuid4().hex 引起的uuid 一.概述 uuid ...
- UUID(uuid)js 生成
全局唯一标识符(GUID,Globally Unique Identifier)也称作 UUID(Universally Unique IDentifier) . GUID是一种由算法生成的二进制长度 ...
- 【Python】Django Model 怎么使用 UUID 作为主键?
>>> import uuidprint uuid.uuid3(uuid.uuid1(), 'python.org') >>> # make a UUID base ...
- Python使用UUID库生成唯一ID(转)
原文:http://www.cnblogs.com/dkblog/archive/2011/10/10/2205200.html 资料: Python官方Doc:<20.15. uuid — U ...
- python 内置模块之hashlib、hmac、uuid
一.hashlib md5和sha算法通过消息摘要算法生成定长的消息摘要,消息摘要算法是不可逆的.但同一段消息通过摘要算法后得到的值是一样的,可一通过比对消息摘要验证数据的完整性. sha算法比MD5 ...
随机推荐
- Sql Server 循环添加日期--(累加到一个字段中)
SQL语句: ),) '
- Winform TabControl控件使用
运行效果: 代码: /// <summary> /// 添加选项卡 /// </summary> /// <param name="sender"&g ...
- 【CSDN博客之星评选】我为什么坚持写博客
今天无意中在CSDN的博客之星评选活动看到自己竟然是候选人之一,真的是十分的惊讶也十分的高兴.对于喜欢写东西.喜欢分享的我来说,已经忍不住用文字来记录一下今天的美好心情,同时也让我回想起我是如何开始在 ...
- zoj3713 7Bit
意思是把一行字符串的长度按照找7位一个字节输出,如果长度能够存在7位里,字节的最高位置0,否则只输出7位并且输出字节的最高位置1,直到全部输出长度. 要注意的是有空串要输出00,其他按照16进制输出就 ...
- Android学习笔记:Activity生命周期详解
进行android的开发,必须深入了解Activity的生命周期.而对这个讲述最权威.最好的莫过于google的开发文档了. 本文的讲述主要是对 http://developer.android.co ...
- Swift - 表格图片加载优化(拖动表格时不加载,停止时只加载当前页图片)
列表的单元格中包含有图片在开发中很常见.通常我们可以直接在tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIn ...
- 阿根廷探戈(Argentine Tango)舞步
阿根廷探戈(Argentine Tango)舞步 阿根廷探戈(Argentine Tango)舞步 2011-11-22 13:05:11 不像其它大部分的社交舞,阿根廷探戈没有固定的舞步,它是一 ...
- 纯css实现苹果表盘动画
欢迎訪问我们的博客:http://www.w3ctrain.com/2015/07/06/Apple-Watch-Dials/ 随着苹果表的大量生产,我想.用CSS来实现拨号动画的时候到了. 在这篇文 ...
- 生成awr报告
主要参考文献: http://343766868.blog.163.com/blog/static/48314056201110124513396/ 概况 Oracle内部以一定的频率把系统关键的统计 ...
- tomcat加载时报The web application [/dmscs] created a ThreadLocal with key of type
严重: The web application [/dmscs] created a ThreadLocal with key of type [com.opensymphony.xwork2.inj ...