首先安裝postgresql
sudo apt-get install postgresql postgresql-contrib
安裝完後要裝pgunit, 在編譯之前先安裝下列項目
sudo apt-get install gcc
sudo apt-get install python-psycopg2
sudo apt-get install libpq-dev
ref: https://stackoverflow.com/questions/28253681/you-need-to-install-postgresql-server-dev-x-y-for-building-a-server-side-extensi
sudo apt-get install postgresql-server-dev-all
sudo apt-get install postgresql-common
ref: https://github.com/travis-ci/travis-ci/issues/2864
再來照pgunit官方文件輸入
sudo make PG_CONFIG=/usr/lib/postgresql/9.5/bin/pg_config
sudo make PG_CONFIG=/usr/lib/postgresql/9.5/bin/pg_config install
然後重啟postgresql
sudo service postgresql restart
or
sudo /etc/init.d/postgresql restart
接著建立extension
CREATE EXTENSION uint;
建立table
CREATE SEQUENCE rank_id_seq;
CREATE TABLE bar (
a uint4 NOT NULL default nextval('rank_id_seq'),
b text
);
ALTER SEQUENCE rank_id_seq owned by bar.a;
ref: https://stackoverflow.com/questions/3108777/how-to-auto-increment-in-postgresql
能auto increment的uint欄位就誕生啦!!!
勁爆經典大帝國I(AWESOME CLASSIC MIX VOL.1)
2017/06/10
2017/04/12
Windows 7 執行.NET/dotnet Core
如果Windows7沒在做Windows Update, 那可能會無法執行.NET Core的程式
除了需要安裝.NET Core Runtime之外, 還需要安裝以下hotfix
x86 https://www.microsoft.com/en-us/download/details.aspx?id=26767
x64 https://www.microsoft.com/en-us/download/details.aspx?id=26764
ref: https://github.com/dotnet/cli/issues/3907#issuecomment-283608339
除了需要安裝.NET Core Runtime之外, 還需要安裝以下hotfix
x86 https://www.microsoft.com/en-us/download/details.aspx?id=26767
x64 https://www.microsoft.com/en-us/download/details.aspx?id=26764
ref: https://github.com/dotnet/cli/issues/3907#issuecomment-283608339
Angular CLI --proxy-config not work?
突然發生Angular CLI的Proxy Config沒有作用
解決方法是在config加上"changeOrigin": true
ref: https://github.com/angular/angular-cli/issues/889#issuecomment-265364681
解決方法是在config加上"changeOrigin": true
ref: https://github.com/angular/angular-cli/issues/889#issuecomment-265364681
訂閱:
文章 (Atom)