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 ...
随机推荐
- 2008r2 做windows域控制器
新配一个: 1.装DNS服务. 2.装domain管理. config domain: 客户端172.16.1.34 ping zyctest
- linux查看端口和进程
查看进程 ps -aux | grep appname 杀死进程 kill pid 查看端口: netstat -ap | grep 端口号 netstat -ap | grep 进程名字 lsof ...
- BZOJ 3505: [Cqoi2014]数三角形( 组合数 )
先n++, m++ 显然答案就是C(3, n*m) - m*C(3, n) - n*C(3, m) - cnt. 表示在全部点中选出3个的方案减去不合法的, 同一行/列的不合法方案很好求, 对角线的不 ...
- Java--格式化输出
Java的格式化输出等同于String.Format,与C有很大的相似,比如 System.out.printf("%8.2f", x); 在printf中,可以使用多个参数,例如 ...
- nm命令
它用来列出一个目标文件中的各种符号. nm命令还是比较简单而且强大的.它用来列出一个目标文件中的各种符号.符号的种类很多,以下是一些常见的符号类型 nm输出字符 含义 R Read only symb ...
- VirtualBox虚拟机下Windows登录密码破解方法(阿里云推荐码:1WFZ0V,立享9折!)
VirtualBox虚拟机下Windows登录密码破解方法 近两年虚拟机的发展给开发人员带来了极大便利,安装一个新环境,只需从别人那里copy一份虚拟机文件即可,分分钟搞定.我之前一直在Ubuntu下 ...
- RedHat Linux 5.5安装JDK+Tomcat并部署Java项目
与大家分享下RedHat Linux 5.5安装JDK+Tomcat并部署Java项目的步骤,希望对大家有用. 1.下载并安装jdk 虚拟机中安装RedHat Linux 5.5 64位企业版, 这里 ...
- webBrowser中操作网页元素全攻略
原文 webBrowser中操作网页元素全攻略 1.获取非input控件的值: webBrowser1.Document.All["控件ID"].InnerText; 或webBr ...
- skip32
在某些应用场景下,需要对数字进行加密,skip32无疑是一种很实用的算法,网上有python的源码(https://bitbucket.org/anuraguniyal/skip32.py/src/4 ...
- sharepoint 2013 根据网站模版创建网站,并赋值网站权限 create a site by custom site template
通过程序,根据网站模版,创建新的网站 private void CreateSiteBySiteTemplate() { SPSecurity.RunWithElevatedPrivileges(de ...