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 ...
随机推荐
- linux指令(目录类操作指令)
pwd 显示当前所在的工作目录 cd 目标目录 例如cd /boot/grub 从当前目录切换到某个目录 cd 切换到根目录 cd.. 切换到当前目录的上层目录 ls 显示当前目录下的内容 ...
- 说说关于php内置函数curl_init()
昨天在我本地的项目,调试时碰到无法识别curl_init()方法,网上查了查才知道是我本地的php.ini文件里没加载上,完了把extension=php_curl.dll前面的;去掉后就好了,注意一 ...
- Java--CyclicBarrier使用简介
CyclicBarrier介绍 (一)一 个同步辅助类,它允许一组线程互相等待,直到到达某个公共屏障点 (common barrier point).在涉及一组固定大小的线程的程序中,这些线程必须不时 ...
- android 4.0后不允许屏蔽掉home键
屏蔽home键的方法 // 屏蔽掉Home键 public void onAttachedToWindow() { this.getWindow().setType(WindowManager.Lay ...
- c语言利用指针计算字符串的长度
可以用strlen函数,这里我们自己写一个. 注意:不能用scanf,scanf一遇到空格就认为输入结束.应该用gets(),遇到换行符或EOF结束.说明可以接受空格. #include<cst ...
- opencv实现连通域
在本文中使用图像连通域统计使用opencv中的cvFloodFill方法,可是在cvFloodFill方法中CvConnectedComp參数无法返回详细点坐标位置信息,找了些资料.给CvSeq分配空 ...
- Swift - iOS中各种视图控制器(View Controller)的介绍
在iOS中,不同的视图控制器负责不同的功能,采用不同的风格向用户呈现信息.下面对各个视图控制器做个总结: 1,标准视图控制器 - View Controller 这个控制器只是用来呈现内容.通常会用来 ...
- sql: sql developer tunnel转接
Use putty tunnel instead of login terminal server 有时候本地直接ping不通sql 的server, 但另一个server能连上,这时就可以把端口和i ...
- SLF4J warning or error messages and their meanings(转)
The method o.a.commons.logging.impl.SLF4FLogFactory#release was invoked. Given the structure of the ...
- Caused by: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity
Caused by: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity ...