<?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>imitatio creatio &#187; databases</title>
	<atom:link href="http://filip.rembialkowski.net/tag/databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://filip.rembialkowski.net</link>
	<description>co we łbie piszczy</description>
	<lastBuildDate>Tue, 15 Jun 2010 12:11:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>postgres schemagrep function</title>
		<link>http://filip.rembialkowski.net/postgres-schemagrep-function/</link>
		<comments>http://filip.rembialkowski.net/postgres-schemagrep-function/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 11:24:03 +0000</pubDate>
		<dc:creator>filip</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[postgres]]></category>

		<guid isPermaLink="false">http://filip.rembialkowski.net/?p=516</guid>
		<description><![CDATA[From time to time, I need to "grep" database schema to locate some database objects.
One possibility is to dump the whole schema to file (pg_dump -s DBNAME) and use your text editor to browse it. It is quite handy and I actually use it a lot.
But sometimes, it is more convenient to have this "grep-like" [...]]]></description>
		<wfw:commentRss>http://filip.rembialkowski.net/postgres-schemagrep-function/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iterate over a table in PostgreSQL vs SAS</title>
		<link>http://filip.rembialkowski.net/iterate-over-a-table-in-postgresql-vs-sas/</link>
		<comments>http://filip.rembialkowski.net/iterate-over-a-table-in-postgresql-vs-sas/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 16:44:40 +0000</pubDate>
		<dc:creator>filip</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[sas]]></category>
		<category><![CDATA[sas 4gl]]></category>

		<guid isPermaLink="false">http://filip.rembialkowski.net/?p=490</guid>
		<description><![CDATA[I have struggled how to achieve something like this in SAS.
(you can read it as pseudocode but it's real PL/PgSQL):


DO $this$
DECLARE my_table name;
BEGIN;
    -- iterate over table names
    FOR my_table IN SELECT nazwa FROM tabele
    LOOP
        sql := 'CREATE [...]]]></description>
		<wfw:commentRss>http://filip.rembialkowski.net/iterate-over-a-table-in-postgresql-vs-sas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PL/Perl regex vs builtin regex_replace in postgres</title>
		<link>http://filip.rembialkowski.net/plperl-regex-vs-builtin-regex_replace-in-postgres/</link>
		<comments>http://filip.rembialkowski.net/plperl-regex-vs-builtin-regex_replace-in-postgres/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 23:19:03 +0000</pubDate>
		<dc:creator>filip</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://filip.rembialkowski.net/?p=382</guid>
		<description><![CDATA[Maybe you (like me) wondered which one is faster... to use builtin regexp_replace function or to use Perl's regex engine via PL/Perl.
Here you are - this is a test I made (PostgreSQL 8.3.7, Perl 5.8.8, on CentOS 5,3)
First we have a plperl function:

CREATE OR REPLACE FUNCTION test_perl( TEXT ) RETURNS TEXT AS
$code$
my $str = shift;
$str [...]]]></description>
		<wfw:commentRss>http://filip.rembialkowski.net/plperl-regex-vs-builtin-regex_replace-in-postgres/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just sue them for bad db design :)</title>
		<link>http://filip.rembialkowski.net/just-sue-them-for-bad-db-design/</link>
		<comments>http://filip.rembialkowski.net/just-sue-them-for-bad-db-design/#comments</comments>
		<pubDate>Fri, 29 May 2009 12:15:48 +0000</pubDate>
		<dc:creator>filip</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[databases]]></category>

		<guid isPermaLink="false">http://filip.rembialkowski.net/?p=356</guid>
		<description><![CDATA[This article by Bert Scalzo has one paragraph which made me smile :)
I've personally served as an expert witness in several court trials where plaintiffs sued defendants for serious financial remuneration when custom database applications had performance and/or data accuracy problems. In every case, there was a failure to data model the business requirements. Thus, [...]]]></description>
		<wfw:commentRss>http://filip.rembialkowski.net/just-sue-them-for-bad-db-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>psql variables &#8211; quoting and more</title>
		<link>http://filip.rembialkowski.net/psql-variables-quoting-and-more/</link>
		<comments>http://filip.rembialkowski.net/psql-variables-quoting-and-more/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 20:40:27 +0000</pubDate>
		<dc:creator>filip</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[hint]]></category>
		<category><![CDATA[LinkedIn]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[psql]]></category>

		<guid isPermaLink="false">http://filip.rembialkowski.net/?p=183</guid>
		<description><![CDATA[psql, postgreSQL powerful command line interface, has it's variables system. I do use it sometimes but... how many single quotes should I put there?
I have puzzled over this so many times, that I decided to put it here as a memo.
Proper quoting of text variables
Variable declaration:

\set d1 '''2008-01-01 00:00:00.000'''
\set d2 '''2008-12-31 23:59:59.999'''

Variable usage:

SELECT something FROM [...]]]></description>
		<wfw:commentRss>http://filip.rembialkowski.net/psql-variables-quoting-and-more/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>column number as column alias in postgres</title>
		<link>http://filip.rembialkowski.net/column-number-as-column-alias-in-postgres/</link>
		<comments>http://filip.rembialkowski.net/column-number-as-column-alias-in-postgres/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 15:21:30 +0000</pubDate>
		<dc:creator>filip</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://filip.rembialkowski.net/?p=159</guid>
		<description><![CDATA[I have seen such queries many times:

SELECT foo, bar, (some long and complicated SQL subexpression), count(*)
FROM somewhere
GROUP BY foo,bar, (some long and complicated SQL subexpression)
ORDER BY count(*) DESC

This has some drawbacks:

 you have to repeat exactly the same expression two times, which makes query longer
 it is easier to make a mistake while editing the [...]]]></description>
		<wfw:commentRss>http://filip.rembialkowski.net/column-number-as-column-alias-in-postgres/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postgres partitioning performance &#8211; rules vs triggers</title>
		<link>http://filip.rembialkowski.net/postgres-partitioning-performance-rules-vs-triggers/</link>
		<comments>http://filip.rembialkowski.net/postgres-partitioning-performance-rules-vs-triggers/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 15:13:27 +0000</pubDate>
		<dc:creator>filip</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[partitioning]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[triggers]]></category>

		<guid isPermaLink="false">http://filip.rembialkowski.net/?p=71</guid>
		<description><![CDATA[Rafal Pietrak asked a question about postgres performance in partitioning scenarios. 
The problem is, in classical partitioning approach you decide into which partition put the data basing only on the inserted data itself.
But we consider also situation when you want to make this decision basing on current database content.
For example we have some "driving" or [...]]]></description>
		<wfw:commentRss>http://filip.rembialkowski.net/postgres-partitioning-performance-rules-vs-triggers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>hstore key rename</title>
		<link>http://filip.rembialkowski.net/hstore-key-rename/</link>
		<comments>http://filip.rembialkowski.net/hstore-key-rename/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 17:42:49 +0000</pubDate>
		<dc:creator>filip</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[postgres]]></category>

		<guid isPermaLink="false">http://filip.rembialkowski.net/hstore-key-rename/</guid>
		<description><![CDATA[hstore is a "Lazy DBA" extension for postgres, which enables storing hash tables in a table column.
When using hstore, sometimes you want to rename hash keys.

#
# create function renamekey( _hstore hstore, _oldname text, _newname text ) returns hstore as
$$ select delete($1, $2) &#124;&#124; ($3 => ($1 -> $2)) $$ language sql immutable strict;
#
# \set old_codename [...]]]></description>
		<wfw:commentRss>http://filip.rembialkowski.net/hstore-key-rename/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
