对于自增列,SQLServer中有identity属性。MySQL中有auto_increment
对于postgresql中,应该如何实现呢?
postgresql的manual给了serial类型
CREATE TABLE tablename1 (
colname SERIAL
);
或者
CREATE SEQUENCE tablename2_colname...
分类:
其他好文 时间:
2015-05-13 16:55:35
阅读次数:
153
linux 下安装 postgresql 数据库...
分类:
数据库 时间:
2015-05-12 23:06:58
阅读次数:
263
PostgreSQL帮助文档
9.8. Data Type Formatting Functions
The PostgreSQL
formatting functions provide a powerful set of tools for converting various data types
(date/time, integer, floating point, numeri...
分类:
数据库 时间:
2015-05-12 21:03:50
阅读次数:
471
安装GITLAB参照官网提供的步骤安装很简单。但在执行gitlab-ctlreconfigure时可能会出现ruby_block[supervise_redis_sleep]actionrun停止在哪,不动的情况。啥原因哪?我的gitlab是kvm的centos7虚拟机会不会是虚拟机的问题?排查半天都不是。最后参照官网提供的方法执行:手工执..
分类:
其他好文 时间:
2015-05-12 19:05:17
阅读次数:
149
背景介绍: PostgreSQL服务端执行在RedHat Linux上,IP为:192.168.230.128 client安装在Windows XP上, IP为:192.168.230.1配置方法:1. 改动服务端/opt/postgresql/data/postgresql.conf文件,将#l...
分类:
数据库 时间:
2015-05-12 13:35:14
阅读次数:
299
1.更改表名alter table 表名 rename to 新表名2.更改字段名alter table 表名 rename 字段名 to 新字段名3,更改字段类型如:ID 字段 原类型为 character varying(50) 新类型为integer其中,ID中原有数据为1,2,3等数字用如下语句更改alter table dbo.titemtype alter column id type...
分类:
数据库 时间:
2015-05-12 11:26:21
阅读次数:
159
一、环境系统:CentOS6.4最小化安装IP:192.168.3.44二、增加yum源增加epel源[root@gitlab~]#rpm-ivhhttp://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrievinghttp://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
warnin..
分类:
其他好文 时间:
2015-05-11 18:13:43
阅读次数:
137
一 Python 环境
1 在intelliJ安装python plugin
2安装 ?https://pypi.python.org/pypi/psycopg2
3 easy_install simplejson
4 在intelliJ新建一个empty项目
下载下来,解压,到其所在文件目录下执行
sudo python setup.py install
CatherinedeMacBook-Pro:D...
分类:
数据库 时间:
2015-05-11 18:05:31
阅读次数:
343
COPY在PostgreSQL表和标准文件系统文件之间交换数据。COPYTO把一个表的所有内容都拷贝到一个文件,而
COPYFROM从一个文件里拷贝数据到一个表里(把数据附加到表中已经存在的内容里)。
COPY
表名
TO '文件名.csv' CSV HEADER;
注:CSV
打开逗号分隔变量(CSV)模式。
HEADER
声明文件包含一个头标识行,包含文件中每个字段的名字...
分类:
数据库 时间:
2015-05-10 17:19:02
阅读次数:
245
本文描述了如使用GitLab CI + Capistrano部署CakePHP应用程序。