<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sokolov blog &#187; PostgreSQL</title>
	<atom:link href="http://blog.sokolov.me/category/postgresql/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sokolov.me</link>
	<description>всякие заметки, в-основном freebsd,linux</description>
	<lastBuildDate>Wed, 14 Dec 2011 16:39:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Postgres: разное</title>
		<link>http://blog.sokolov.me/2011/03/11/postgres-%d1%80%d0%b0%d0%b7%d0%bd%d0%be%d0%b5/</link>
		<comments>http://blog.sokolov.me/2011/03/11/postgres-%d1%80%d0%b0%d0%b7%d0%bd%d0%be%d0%b5/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 23:27:48 +0000</pubDate>
		<dc:creator>pavel</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[postgres]]></category>

		<guid isPermaLink="false">http://blog.sokolov.me/?p=879</guid>
		<description><![CDATA[Изменение уровня дебага в консоли: SET client_min_messages TO DEBUG;]]></description>
			<content:encoded><![CDATA[<p>Изменение уровня дебага в консоли:<br />
<code>SET client_min_messages TO DEBUG;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sokolov.me/2011/03/11/postgres-%d1%80%d0%b0%d0%b7%d0%bd%d0%be%d0%b5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Полнотекстовый поиск в postgresql</title>
		<link>http://blog.sokolov.me/2010/11/19/%d0%bf%d0%be%d0%bb%d0%bd%d0%be%d1%82%d0%b5%d0%ba%d1%81%d1%82%d0%be%d0%b2%d1%8b%d0%b9-%d0%bf%d0%be%d0%b8%d1%81%d0%ba-%d0%b2-postgresql/</link>
		<comments>http://blog.sokolov.me/2010/11/19/%d0%bf%d0%be%d0%bb%d0%bd%d0%be%d1%82%d0%b5%d0%ba%d1%81%d1%82%d0%be%d0%b2%d1%8b%d0%b9-%d0%bf%d0%be%d0%b8%d1%81%d0%ba-%d0%b2-postgresql/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 00:24:54 +0000</pubDate>
		<dc:creator>pavel</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://blog.sokolov.me/?p=749</guid>
		<description><![CDATA[http://www.sai.msu.su/~megera/postgres/talks/fts_pgsql_intro.htmll]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sai.msu.su/~megera/postgres/talks/fts_pgsql_intro.html">http://www.sai.msu.su/~megera/postgres/talks/fts_pgsql_intro.html</a>l</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sokolov.me/2010/11/19/%d0%bf%d0%be%d0%bb%d0%bd%d0%be%d1%82%d0%b5%d0%ba%d1%81%d1%82%d0%be%d0%b2%d1%8b%d0%b9-%d0%bf%d0%be%d0%b8%d1%81%d0%ba-%d0%b2-postgresql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postgres: логирование изменений с помощью триггеров</title>
		<link>http://blog.sokolov.me/2010/11/11/postgres-%d0%bb%d0%be%d0%b3%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5-%d0%b8%d0%b7%d0%bc%d0%b5%d0%bd%d0%b5%d0%bd%d0%b8%d0%b9-%d1%81-%d0%bf%d0%be%d0%bc%d0%be%d1%89%d1%8c%d1%8e-%d1%82%d1%80%d0%b8/</link>
		<comments>http://blog.sokolov.me/2010/11/11/postgres-%d0%bb%d0%be%d0%b3%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5-%d0%b8%d0%b7%d0%bc%d0%b5%d0%bd%d0%b5%d0%bd%d0%b8%d0%b9-%d1%81-%d0%bf%d0%be%d0%bc%d0%be%d1%89%d1%8c%d1%8e-%d1%82%d1%80%d0%b8/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 15:16:47 +0000</pubDate>
		<dc:creator>pavel</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[triggers]]></category>

		<guid isPermaLink="false">http://blog.sokolov.me/?p=742</guid>
		<description><![CDATA[Тема описывающая способы логирования]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sql.ru/forum/actualthread.aspx?tid=758650">Тема </a>описывающая способы логирования</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sokolov.me/2010/11/11/postgres-%d0%bb%d0%be%d0%b3%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5-%d0%b8%d0%b7%d0%bc%d0%b5%d0%bd%d0%b5%d0%bd%d0%b8%d0%b9-%d1%81-%d0%bf%d0%be%d0%bc%d0%be%d1%89%d1%8c%d1%8e-%d1%82%d1%80%d0%b8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postgres 8.4 + FreeBSD 8.x</title>
		<link>http://blog.sokolov.me/2010/10/04/postgres/</link>
		<comments>http://blog.sokolov.me/2010/10/04/postgres/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 12:44:35 +0000</pubDate>
		<dc:creator>kfx</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[postgres]]></category>

		<guid isPermaLink="false">http://blog.sokolov.me/?p=712</guid>
		<description><![CDATA[Для увеличения максимального к-ва коннектов, осбслуживаемых постгресом: sysctl.conf kern.ipc.shmmax=2147483648 kern.ipc.shmall=2097152 loader.conf kern.ipc.semmni=256 kern.ipc.semmns=32000 kern.ipc.semmnu=256 postgresql.conf max_connections = 250]]></description>
			<content:encoded><![CDATA[<p>Для увеличения максимального к-ва коннектов, осбслуживаемых постгресом:</p>
<p>sysctl.conf</p>
<p><code>kern.ipc.shmmax=2147483648<br />
kern.ipc.shmall=2097152</code></p>
<p>loader.conf</p>
<p><code>kern.ipc.semmni=256<br />
kern.ipc.semmns=32000<br />
kern.ipc.semmnu=256</code></p>
<p>postgresql.conf</p>
<p><code>max_connections = 250</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sokolov.me/2010/10/04/postgres/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postgres: получение всех CONSTRAINTS</title>
		<link>http://blog.sokolov.me/2010/09/30/postgres-get-constaints/</link>
		<comments>http://blog.sokolov.me/2010/09/30/postgres-get-constaints/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 19:17:14 +0000</pubDate>
		<dc:creator>pavel</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://blog.sokolov.me/?p=708</guid>
		<description><![CDATA[SELECT tc.constraint_name, tc.constraint_type, tc.table_name, kcu.column_name, tc.is_deferrable, tc.initially_deferred, rc.match_option AS match_type, rc.update_rule AS on_update, rc.delete_rule AS on_delete, ccu.table_name AS references_table, ccu.column_name AS references_field FROM information_schema.table_constraints tc LEFT JOIN information_schema.key_column_usage kcu ON tc.constraint_catalog = kcu.constraint_catalog AND tc.constraint_schema = kcu.constraint_schema AND tc.constraint_name = kcu.constraint_name LEFT JOIN information_schema.referential_constraints rc ON tc.constraint_catalog = rc.constraint_catalog AND tc.constraint_schema = rc.constraint_schema AND tc.constraint_name [...]]]></description>
			<content:encoded><![CDATA[<p><code>SELECT tc.constraint_name,<br />
          tc.constraint_type,<br />
          tc.table_name,<br />
          kcu.column_name,<br />
	  tc.is_deferrable,<br />
          tc.initially_deferred,<br />
          rc.match_option AS match_type,<br />
          rc.update_rule AS on_update,<br />
          rc.delete_rule AS on_delete,<br />
          ccu.table_name AS references_table,<br />
          ccu.column_name AS references_field<br />
     FROM information_schema.table_constraints tc<br />
LEFT JOIN information_schema.key_column_usage kcu<br />
       ON tc.constraint_catalog = kcu.constraint_catalog<br />
      AND tc.constraint_schema = kcu.constraint_schema<br />
      AND tc.constraint_name = kcu.constraint_name<br />
LEFT JOIN information_schema.referential_constraints rc<br />
       ON tc.constraint_catalog = rc.constraint_catalog<br />
      AND tc.constraint_schema = rc.constraint_schema<br />
      AND tc.constraint_name = rc.constraint_name<br />
LEFT JOIN information_schema.constraint_column_usage ccu<br />
       ON rc.unique_constraint_catalog = ccu.constraint_catalog<br />
      AND rc.unique_constraint_schema = ccu.constraint_schema<br />
      AND rc.unique_constraint_name = ccu.constraint_name</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sokolov.me/2010/09/30/postgres-get-constaints/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL 9.0</title>
		<link>http://blog.sokolov.me/2010/09/20/postgresql-9-0/</link>
		<comments>http://blog.sokolov.me/2010/09/20/postgresql-9-0/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 16:06:59 +0000</pubDate>
		<dc:creator>pavel</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://blog.sokolov.me/?p=693</guid>
		<description><![CDATA[Exclusion Constraints: http://developer.postgresql.org/pgdocs/postgres/ddl-constraints.html#DDL-CONSTRAINTS-EXCLUSION http://www.depesz.com/index.php/2010/01/03/waiting-for-8-5-exclusion-constraints/]]></description>
			<content:encoded><![CDATA[<p><strong>Exclusion Constraints:</strong><br />
<a href="http://developer.postgresql.org/pgdocs/postgres/ddl-constraints.html#DDL-CONSTRAINTS-EXCLUSION">http://developer.postgresql.org/pgdocs/postgres/ddl-constraints.html#DDL-CONSTRAINTS-EXCLUSION</a><br />
<a href="http://www.depesz.com/index.php/2010/01/03/waiting-for-8-5-exclusion-constraints/">http://www.depesz.com/index.php/2010/01/03/waiting-for-8-5-exclusion-constraints/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sokolov.me/2010/09/20/postgresql-9-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PosrgreSQL: Заметки</title>
		<link>http://blog.sokolov.me/2010/02/17/posrgresql-notes/</link>
		<comments>http://blog.sokolov.me/2010/02/17/posrgresql-notes/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 20:56:56 +0000</pubDate>
		<dc:creator>pavel</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Без рубрики]]></category>
		<category><![CDATA[postgres]]></category>

		<guid isPermaLink="false">http://blog.sokolov.me/?p=528</guid>
		<description><![CDATA[Хорошие заметки по postgres. Массивы: Преобразование массивов: Оригинал тут select client_id, array_agg(order_id) from simple_table group by client_id; select * from explode_array(array[1,2,3,4]); Парсинг массивов postgres в php: http://dklab.ru/lib/DB_Pgsql_Type/ Служебная информация: Описание схемы: http://www.postgresql.org/docs/8.4/interactive/information-schema.html Выбор информации обо всех таблицах: SELECT c.table_schema, c.table_name, array_agg(CAST(c.column_name AS text)) as col_names, array_agg(DISTINCT CAST(c.data_type AS text)) As dat_types FROM information_schema.columns AS c [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.postgres.cz/index.php/PostgreSQL_SQL_Tricks">Хорошие заметки по postgres</a>.</p>
<h4>Массивы:</h4>
<p><strong>Преобразование массивов:</strong><br />
Оригинал <a href="http://www.depesz.com/index.php/2008/11/14/waiting-for-84-array-aggregate-and-array-unpacker/">тут</a><br />
<code><br />
select client_id, array_agg(order_id) from simple_table group by client_id;<br />
select * from explode_array(array[1,2,3,4]);<br />
</code><br />
<strong>Парсинг массивов postgres в php:</strong><br />
<a href="http://dklab.ru/lib/DB_Pgsql_Type/">http://dklab.ru/lib/DB_Pgsql_Type/</a></p>
<h4>Служебная информация:</h4>
<p><strong>Описание схемы:</strong><br />
<a href="http://www.postgresql.org/docs/8.4/interactive/information-schema.html">http://www.postgresql.org/docs/8.4/interactive/information-schema.html</a></p>
<p><strong>Выбор информации обо всех таблицах:</strong><br />
<code>SELECT c.table_schema, c.table_name,<br />
 array_agg(CAST(c.column_name AS text)) as col_names,<br />
 array_agg(DISTINCT CAST(c.data_type AS text)) As dat_types<br />
 FROM information_schema.columns AS c<br />
GROUP BY c.table_schema, c.table_name;<br />
</code></p>
<p><strong>Либа для автоматических тестов PGUNIT:</strong><br />
<a href="http://dklab.ru/lib/dklab_pgunit/">http://dklab.ru/lib/dklab_pgunit/</a></p>
<h4>Бэкапы</h4>
<p>Хорошая статья про ON-LINE backup <a href="http://www.opennet.ru/base/sys/postgresql_online_backup.txt.html">http://www.opennet.ru/base/sys/postgresql_online_backup.txt.html</a><br />
Для того, чтобы сделать простой бэкап в формате SQL:<br />
<code>pg_dump --inserts -U pavel -W database_name > /home/pavel/backup.sql</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sokolov.me/2010/02/17/posrgresql-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

