postgres
以前のencodingは sjis(cp932)やらeuc-jp等、作るものによってバラバラでしたが、utf8に統一されるようになってきたので、備忘として書いておきます。http://search.cpan.org/perldoc?DBD::mysql以下のようにdb接続時に mysql_enable_utf8 を指定すれば、per…
販売管理システムの受注明細のようなデータを1つのtableに対してレコードを追加し続け、巨大になったtableがあるとします。 このようなtableでは、indexを設定していたとしても、indexファイルまで巨大になり、selec等のCRUD処理だけでなく、vacuumの処理速…
PostgreSQLにはバイナリデータを格納する為にbytea型という独自仕様が用意されていますが、私の場合、Base64 encoding後、text型へ格納しています。 CREATE TABLE data_binary ( file_name text primary key, data text ); 次の例は、compress + base64 を行…
bash-3.2$ psql -l -U postgres List of databases Name | Owner | Encoding -----------+----------+---------- EndoTest | postgres | EUC_JP postgres | postgres | EUC_JP template0 | postgres | EUC_JP template1 | postgres | EUC_JP