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:\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() ;
Postgre: How to import UUID function into Postgre 9.3的更多相关文章
- 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:\Progra ...
- 我的一次Postgre数据库Insert 、Query性能优化实践
一.前言 以前的系统由于表设计比较复杂(多张表,表与表直接有主从关系),这个是业务逻辑决定的. 插入效率简直实在无法忍受,必须优化.在了解了Postgre的Copy,unlogged table 特性 ...
- 杂项: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 ...
随机推荐
- 【Codeforces AIM Tech Round 4 (Div. 2) C】
·将排序限制于子序列中,又可以说明什么呢? C. Sorting by Subsequences ·英文题,述大意: 输入一个长度为n的无重复元素的序列{a1,a2……an}(1<= ...
- HEOI2017游记
Day -1: noip与标准时限差了0.02秒,并没有申诉成功,导致NOIWC多交了900元钱. 滚回去准备学考,文科瞎写居然拿了A,可啪. NOIWC颓废记由于我实在太颓了所以懒得填坑了. THU ...
- Spring学习笔记6——注解方式测试
需要下载junit-4.12.jar和hamcrest-all-1.3.jar,将下载好的包导入到项目当中. 修改TestSpring, 并运行1. @RunWith(SpringJUnit4Clas ...
- React 深入系列4:组件的生命周期
文:徐超,<React进阶之路>作者 授权发布,转载请注明作者及出处 React 深入系列4:组件的生命周期 React 深入系列,深入讲解了React中的重点概念.特性和模式等,旨在帮助 ...
- CSS中的ul与li样式详解 list-type
转自新浪博客http://blog.sina.com.cn/u/2539885750 ul和li列表是使用CSS布局页面时常用的元素.在CSS中,有专门控制列表表现的属性,常用的有list-style ...
- Servlet-----response.getWriter().write()与out.print()的区别
50313 1.首先介绍write()和print()方法的区别: (1).write():仅支持输出字符类型数据,字符.字符数组.字符串等 (2).print():可以将各种类型(包括Obje ...
- vue mint-ui 实现省市区街道4级联动(仿淘宝京东收货地址4级联动)
demo及源码地址 https://github.com/artiely/citypicker 先去下载一个“省份.城市.区县.乡镇” 四级联动数据,然后 引入 import { Picker } f ...
- Leetcode Scratching Recorder
Author: Zhong-Liang Xiang Start from: August 7th, 2017 这个题为连滚带爬的Leetcode填坑记录就这么开始了. 网上看了看, 一堆小伙从2014 ...
- Luogu P3919 【模板】可持久化数组 可持久化线段树
其实就是可持久化线段树的模板题线段树不会看这里 #include<bits/stdc++.h> ; using namespace std; ]; ],rc[N*],val[N*],cnt ...
- Python安装与环境变量的配置
python下载: Python安装包下载地址:http://www.python.org/ 根据实际的操作系统,安装合适的安装版本. Python安装: 本文以python 2.7.8(64位)为例 ...