Time of Update: 2018-08-16
標籤:pass password post one turn 操作 col except exec 1 import psycopg2 as pg2 2 3 #
Time of Update: 2018-08-10
標籤:匯入 一個 war content 路徑 schema 0.12 檔案 輸出 匯入sql -w 指定資料庫名psql -h 192.168.20.12
Time of Update: 2018-08-14
標籤:run tab target mys code http restart 還原 實現 在 mysql 中如果需要清空表,只需要TRUNCATE table_name;即可,如果有自增的
Time of Update: 2018-12-04
--查看資料庫select * from pg_database;--查看錶空間select * from pg_tablespace;--查看語言select * from pg_language;--查看角色使用者select * from pg_user;select * from pg_shadow;select * from pg_roles;--查看會話進程select * from pg_stat_activity;--查看錶SELECT * FROM pg_tables
Time of Update: 2018-12-03
安裝:sudo apt-get install postgresql設定密碼sudo -u postgres psql postgres=# ALTER USER postgres WITH PASSWORD ‘postgres’;postgres=# \qsudo passwd -d postgressudo -u postgres passwd更改設定檔sudo vim /etc/postgresql/8.4/main/postgresql.conflisten_addresses = ‘*
Time of Update: 2018-12-04
postgreSQL資料庫 事務:1.postgreSQL資料庫不支援事務嵌套,但是支援在當前事務裡定義新儲存點,用儲存點來解決需要事務嵌套的地方。儲存點可以嵌套。2.ROLLBACK TO SAVEPOINT 1)復原所有指定儲存點建立之後執行的命令(包括這之後還有儲存點的命令,也復原了),儲存點仍然有效,並且需要時可以再次復原到該點。2)隱含地刪除所有在該儲存點之後建立的儲存點3.RELEASE
Time of Update: 2018-12-03
1.在資料庫伺服器安裝完成後,預設有三個資料庫,可以通過下面兩種方法查看。postgres=# SELECT * FROM pg_database; datname | datdba | encoding | datcollate | datctype | datistemplate | datallowconn | datconnlimit | datlastsysoid | datfrozenxid | dattablespace | datconfig |
Time of Update: 2018-12-03
背景介紹: PostgreSQL服務端運行在RedHat Linux上,IP為:192.168.230.128 用戶端安裝在Windows XP上, IP為:192.168.230.1配置方法: 1. 修改服務端/opt/postgresql/data/postgresql.conf檔案,將#listen_address='localhost'改成listen_address='*' 2.
Time of Update: 2018-12-04
author: takhisis@smth http://computer.mblogger.cn/abyss/ 一定要讓自己忙起來什麼也不想, 什麼也不要想, 不要想...不準想. About PostgreSQL PostgreSQL is an object-relational database management system (ORDBMS) based on POSTGRES, Version 4.2, developed at the University of
Time of Update: 2018-12-04
最近,由於效能的問題把一些大資料量的表改為分區表(partition table)。在postgresql下這個過程也是很艱難的,參見我的另一篇文章。 本來這是一件利國利民的好事,誰料居然發生了沒有料想到的事情。幾天后有人發現對某個分區表的一個查詢特別的慢。查看後探索資料量大概為500w-600w查詢時間居然需要12s-13s。 這個不正常,分析後發現該sql中單單一個 select max(time_stamp) from **table; 的語句基本就耗費了11-12s。吼吼,
Time of Update: 2018-12-05
typedef struct LOCK{/* hash key */LOCKTAG tag; /* unique identifier of lockable object *//* data */LOCKMASK grantMask; /* bitmask for lock types already granted */LOCKMASK waitMask; /* bitmask for lock types awaited */SHM_QUEUE procLocks;
Time of Update: 2018-12-05
Normal 0 7.8 磅 0 2 false false false MicrosoftInternetExplorer4 /* Style Definitions */
Time of Update: 2018-12-05
--po_info為主表,po_item為從表,po_info中有更新欄位lastupdatetime,兩張表關聯欄位po_id---------------po_id用觸發器監控表的更新,用lastupdatetime記錄時間--------------------建立觸發器過程--CREATE OR REPLACE FUNCTION po_info() RETURNS trigger AS$BODY$BEGIN If (TG_OP = 'UPDATE') THEN
Time of Update: 2018-12-03
一直想為 pg 做點貢獻,今天終於有空了, 於是寫一個PostgreSQL 9.13 入門的教程 ...部署上可以移步這裡 ...php 5.4.10 + nginx1.0.12 + PostgreSQL 9.1.3 源碼編譯自動化部署第二版http://blog.csdn.net/qzier_go/article/details/7316510----------------------------------------------------------------------------
Time of Update: 2018-12-05
Linux下postgresql 安裝 1 添加使用者 建立目錄 useradd postgres -d /usr/local/pgsql passwd postgres mkdir /usr/local/pgsql/ mkdir /usr/local/pgsql/data chown -R postgres /usr/local/pgsql chown postgres /usr/local/pgsql/data 2 設定環境變數 vi /etc/profile export
Time of Update: 2018-12-03
//g++ getTableFieldNum.cpp pqCopy.cpp -I /usr/local/pgsql/include/ -L/usr/local/pgsql/lib -lpq -o get -g#include <libpq-fe.h>#include <iostream>#include "pqCopy.h" using namespace std;char pDBServer[STR_LEN+1];char g_strDBName[STR_LEN +1]
Time of Update: 2018-12-05
1. 輸入參數 nPageSize 每頁包含的記錄數量nPageIndex 要顯示的頁碼,>=1strOrderByFieldName 排序欄位strOrderByDirection 排序方向other 其他查詢條件 2. 計算總頁數 nTotalCount 總的記錄數,從 select count(*) from xxx where other 取得值nPageCount 總的頁數 nPageCount = (nTotalCount-1)/nPageSize+1 3.
Time of Update: 2018-12-05
安裝環境:Ubuntu 8.10 1、輸入以下命令 $sudo apt-get install postgresql 會提示你是否安裝最新版本的 PostgreSQL 資料庫,輸入 Y ,系統自動完成安裝 這樣就安裝好 PostgreSQL 8.x.x 了,該安裝將自動建立一個預設的資料庫叢集 “main”;產生一個資料庫超級使用者postgres,密碼為空白,它即是作業系統使用者(不可登入),也是資料庫使用者(可登入)
Time of Update: 2018-12-05
文章目錄 使用PostgreSQL資料庫做PHP開發 使用PostgreSQL資料庫做PHP開發作者:heiyeshuwu 使用PostgreSQL資料庫做PHP開發說明:下面內容更多是講怎麼安裝環境的,實際開發內容幾乎沒有,你可以考慮是否閱讀本文。PostgreSQL資料庫應該算是資料庫界的啟明星,其中一些功能甚至超過了Oracle等商務資料庫,在開源世界來講,可以說是非常不錯的,甚至MySQL都跟它差很遠。它支援包括JDBC、ODBC、
Time of Update: 2018-12-04
測試環境:win2003+PostgreSQL8.3(PostgreSQL89.0的不好用) 一、建立資料庫語言1.開啟「開始」菜單/程式/PostgreSQL 8.3/命令提示字元2.執行命令“createlang -U postgres plpgsql postgres”如(E:/Program Files/PostgreSQL/8.3/bin>createlang -U postgres plpgsql postgres) 二、建立資料庫create table