Archive for the ‘PostgresQL’ Category
Thursday, February 6th, 2014
postgres=# SELECT * from pg_stat_activity ;
Отменить/убить запрос можно:
SELECT pg_cancel_backend(pid of the postgres process);
Posted in PostgresQL | No Comments »
Thursday, April 7th, 2011
вывод что выполняеть щаз:
[sourcecode language="sql"]select * from pg_stat_activity;[/sourcecode]
отменить
[sourcecode language="sql"]SELECT pg_cancel_backend(pid of the postgres process);[/sourcecode]
Posted in PostgresQL | No Comments »
Wednesday, June 16th, 2010
создаем пользователя:
[sourcecode language="sql"]create user george with password 'password';[/sourcecode]
создаем БД на которуб у него будут полные права:
[sourcecode language="sql"]CREATE DATABASE softpedia OWNER george;[/sourcecode]
Posted in PostgresQL | No Comments »
Sunday, August 10th, 2008
#su pgsql
$psql postgres
Welcome to psql 8.3.3, the PostgreSQL interactive terminal.
postgres=# alter user dima with password '123456';
ALTER ROLE
Posted in PostgresQL | 2 Comments »
Sunday, August 10th, 2008
В /etc/login.conf добавить:
postgres:\
:lang=ru_RU.UTF-8:\
:setenv=LC_COLLATE=C:\
:tc=default:
В /etc/rc.conf добавить:
postgresql_initdb_flags="--locale=ru_RU.UTF-8"
Запускаем создание БД:
/usr/local/etc/rc.d/postgresql initdb
Стартуем сервер и получаем рабочие UPPER() и LOWER().
Создать БД в другой кодировке можно так:
createdb --encoding=win1251new_db
Посмотреть все доступные локали в системе:
locale -a | grep ru
Источник: http://www.sql.ru/forum/actualthread.aspx?tid=528390
Posted in PostgresQL | No Comments »