postgres

1.postgresにログイン $ psql postgres-db Welcome to psql 8.0.4, the PostgreSQL interactive terminal. ← ここでも大概が分かるType: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminat…

★実行したSQLをテキストに出力する方法 DBにログインして \pset format unaligned \pset fieldsep '\t' →tab区切りってこと \o ファイル名(out.txtとか) select * from table名 DBからログアウトすれば、SQLの実行結果がファイルに出力されている。

DBの参照権限だけを持つユーザ作成方法 http://www.postgresql.jp/document/pg702doc/user/user.htm