码迷,mamicode.com
首页 >  
搜索关键字:psql    ( 253个结果
PostgreSQL操作-psql基本命令
一、建立数据库连接 ---------------- 接入PostgreSQL数据库: psql -h IP地址 -p 端口  -U 数据库名 之后会要求输入数据库密码   二、访问数据库 1、列举数据库:\l 2、选择数据库:\c  数据库名 3、查看该某个库中的所有表:\dt 4、切换数据库:\c interface 5、查看某个库中的某个表结构:\d 表名 6、查看某个...
分类:数据库   时间:2014-12-18 13:38:15    阅读次数:507
工作总结篇:常用知识积累第一波
前言:最近两三周积累一些常用的知识点,主要是平常工作中经常用的,共享一下。 postgre数据库导入导出 1.首先通过环境变量将postgre的bin路径配置到path下面 2.pg_dump -U postgres starxxxx > starxxxx.sql 3.psql -U postgres starxxxx 通过以上命令可以进行数据库包括序列的简单导入和...
分类:其他好文   时间:2014-12-04 10:19:39    阅读次数:161
PSQL命令小结
经常使用psql查询数据,现在总结几个常用的命令参数,供以后参考-h 数据库地址-U 数据库用户名-t 不打印字段等信息-c 执行的SQL语句-s 单步执行,就是执行的时候不断按回车事例:/opt/pg93/bin/psql -h ${TDATA_HOST} -U ${TDATA_USE...
分类:数据库   时间:2014-11-21 18:34:01    阅读次数:173
How vacuum template0
[pg@h1 ~]$ vacuumdb --freeze template0 vacuumdb: could not connect to database template0: FATAL: database "template0" is not currently accepting connections [pg@h1 ~]$ psql template0 psql: FATAL: da...
分类:其他好文   时间:2014-11-19 01:58:54    阅读次数:234
Postgresql 数据库维护
删除数据库 sudo -u postgres dropdb $DB_NAME 导出数据库 pg_dump -h $DB_HOST -U $DB_USER --clean --schema=$DB_SCHEMA -d $DB_NAME > $DUMP_FILE_NAME 导入数据库 psql -U $...
分类:数据库   时间:2014-11-14 15:29:48    阅读次数:245
Pgsql
安装前提:GUNmake版本:sudomake–versionGNUMake3.81#建议3.76.1或者更高版本需要一个ISO/ANSIC编译器(至少兼容C89)。GCC缺省时将自动使用GNUReadline库(这样可以方便地编辑和检索命令历史)。它允许psql(PostgreSQL命令行的SQL解释)记住每个命令类型,并允许您使用箭头?.
分类:数据库   时间:2014-11-13 19:05:47    阅读次数:193
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 -...
分类:其他好文   时间:2014-11-12 19:51:25    阅读次数:215
利用管道迁移数据
磁盘空间不足的情况下,利用命名或者匿名管道迁移和导入数据;需要注意命名管道的权限问题。 0. Name PIP 0 [pg@h1 ~]$ psql gtlions -ac "select 't3' tab,count(*) from t3 union all select 't4',count(*) from t4;" select 't3' tab,count(*) from t3 uni...
分类:其他好文   时间:2014-11-06 11:09:31    阅读次数:206
Enable DB Query in HUE web UI
putconfigurationinHUEasbelow:[librdbms]#TheRDBMSappcanhaveanynumberofdatabasesconfiguredinthedatabases#section.Adatabaseisknownbyitssectionname#(IEsqlite,mysql,psql,andoracleinthelistbelow).[[databases]]#sqliteconfiguration.##[[[sqlite]]]#NametoshowintheUI...
分类:数据库   时间:2014-10-31 15:55:19    阅读次数:412
Django与PostgreSQL数据库的那些事
删除psql数据库:(以数据库Django名为例:)dropdbDjango;新建数据库并属于django:createdbDjango-Odjango当我们在Django中用了pythonmanage.pysyncdb后,会在PostgreSQL中新建了对应的应用的表,但是有时候会发现在admin管理平台时添加数据时出现CSRF错误。这时候,我们要采..
分类:数据库   时间:2014-10-31 06:29:20    阅读次数:206
253条   上一页 1 ... 21 22 23 24 25 26 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!