<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atomfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="0.3">

<title type="text/plain">Just a Theory</title>
<tagline type="text/plain">Theory waxes practical. By David Wheeler.</tagline>
<link rel="alternate" type="text/html" href="http://justatheory.com" />
<id>tag:justatheory.com,2009:/computers/databases</id>
<generator url="http://www.blosxom.com/" version="2.1">Blosxom</generator>

<link rel="start" href="http://feeds.feedburner.com/justatheory/pgsum" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry>
<id>tag:justatheory.com,2009:/computers/databases/postgresql/pgtap-best-practices</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/wJbKsrFNQ6M/pgtap-best-practices.html" />
<title type="text/plain">pgTAP Best Practices Slides Available</title>

<issued>2009-11-04T20:13:00Z</issued>
<modified>2009-11-04T20:13:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Last month I gave two presentations at the <a href="http://www.postgresqlconference.org/2009/west/" title="West 2009, Seattle! | PostgreSQL Conference">PostgreSQL Conference West</a>. The first was a variation on <a href="/computers/databases/postgresql/unit-test-your-database.html" title="Just a Theory: “Unit Test Your Database!”">Unit Test Your Database!</a>, which I've now given about six times (and will at least two more times, including tomorrow night for <a href="http://www.pdxlinux.org/" title="Portland Linux/Unix User Group">Portland PLUG</a> and in two weeks at the <a href="http://www.postgresql.jp/events/pgcon09j/e/">JPUG 10th Anniversary Conference</a>). The second was a new talk, a 90-minute tutorial, called “pgTAP Best Practices.” And here it is, published on Slideshare. Enjoy.</p><p><a href="http://justatheory.com/computers/databases/postgresql/pgtap-best-practices.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/wJbKsrFNQ6M" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/postgresql/pgtap-best-practices.html</feedburner:origLink></entry>

<entry>
<id>tag:justatheory.com,2009:/computers/databases/postgresql/parse-pg-acls-with-pg-priv</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/tce-R2LDYtA/parse-pg-acls-with-pg-priv.html" />
<title type="text/plain">Pg::Priv Hits CPAN (Thanks Etsy!)</title>

<issued>2009-10-30T23:59:00Z</issued>
<modified>2009-10-30T23:59:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Earlier this year, I was working on an administrative utility for
<a href="http://www.etsy.com/">Etsy</a> that validates PostgreSQL database
permissions. Of course, in order to verify that permissions were correct or
needed updating, I had to have a way to examine PostgreSQL ACLs, which are
arrays made of of strings that look like this:</p><p><a href="http://justatheory.com/computers/databases/postgresql/parse-pg-acls-with-pg-priv.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/tce-R2LDYtA" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/postgresql/parse-pg-acls-with-pg-priv.html</feedburner:origLink></entry>

<entry>
<id>tag:justatheory.com,2009:/computers/databases/postgresql/unicode-normalization</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/CdDcATBHjdI/unicode-normalization.html" />
<title type="text/plain">Unicode Normalization in SQL</title>

<issued>2009-09-23T22:10:00Z</issued>
<modified>2009-09-23T22:10:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I've been peripherally aware of the need for unicode normalization in my
code for a while, but only got around to looking into it today. Although I
use <a href="http://search.cpan.org/perldoc?Encode" title="Encode on CPAN">Encode</a> to convert text inputs into Perl's internal form and UTF-8 or
an appropriate encoding in all my outputs, it does nothing about
normalization.</p><p><a href="http://justatheory.com/computers/databases/postgresql/unicode-normalization.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/CdDcATBHjdI" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/postgresql/unicode-normalization.html</feedburner:origLink></entry>

<entry>
<id>tag:justatheory.com,2009:/computers/databases/postgresql/enable-csvlogging</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/8fd2PNTbJbQ/enable-csvlogging.html" />
<title type="text/plain">Enable CSV Logging in PostgreSQL</title>

<issued>2009-08-19T18:23:00Z</issued>
<modified>2009-08-19T18:23:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>One of the cooler features of recent versions of PostgreSQL is support for
<a href="http://www.postgresql.org/docs/current/static/runtime-config-logging.html" title="PostgreSQL Documentation: “Error Reporting and Logging”">CSV-formatted
logging</a>. I've never had a chance to use it, but after reading
Josh's <a href="http://it.toolbox.com/blogs/database-soup/more-fun-with-windowing-functions-your-query-log-33467" title="">cool hack for determining sums of concurrent queries</a> using
windowing functions in PostgreSQL 8.4 to query a table generated from a CSV
log, I just had to give it a try. But while there
is <a href="http://www.postgresql.org/docs/current/static/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-CSVLOG" title="PostgreSQL Documentation: “Using CSV-Format Log Output”">decent
documentation</a> for loading up the contents of a CSV-formatted log file,
there I couldn't find simple information on how to set it up. So I figured it
out and record it here for posterity.</p><p><a href="http://justatheory.com/computers/databases/postgresql/enable-csvlogging.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/8fd2PNTbJbQ" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/postgresql/enable-csvlogging.html</feedburner:origLink></entry>

<entry>
<id>tag:justatheory.com,2009:/computers/databases/postgresql/test-your-results</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/Ui8mn7TSty4/test-your-results.html" />
<title type="text/plain">pgTAP 0.22: Test Your Results</title>

<issued>2009-07-31T00:47:00Z</issued>
<modified>2009-07-31T00:47:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I'm pleased to announce that,
<a href="/computers/databases/postgresql/comparing-relations.html" title="Thoughts on Testing SQL Result Sets">after</a>
<a href="/computers/databases/postgresql/result-testing-function-names.html" title="Need Help Naming Result Set Testing Functions">much</a>
<a href="/computers/databases/postgresql/set_testing_update.html" title="pgTAP Set-Testing Update">thinking</a>,
<a href="/computers/databases/postgresql/results_eq.html" title="Committed: pgTAP Result Set Assertion Functions">committing</a>,
and not an insignificant amount of
<a href="/computers/databases/postgresql/neither-null-nor-not-null.html" title="Neither NULL nor NOT NULL: An SQL WTF">hair-pulling</a>,
<a href="http://pgtap.projects.postgresql.org/" title="pgTAP: Unit Testing for PostgreSQL">pgTAP</a> 0.22 has finally landed. Download it
<a href="http://pgfoundry.org/frs/?group_id=1000389" title="Download pgTAP">here</a>. Many, <em>many</em> thanks to all who commented on my
previous posts, made suggestions, and helped me on IRC to figure out how to
get all this stuff to work. The crazy thing is that it does, quite well, all
the way back to PostgreSQL 8.0.</p><p><a href="http://justatheory.com/computers/databases/postgresql/test-your-results.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/Ui8mn7TSty4" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/postgresql/test-your-results.html</feedburner:origLink></entry>

<entry>
<id>tag:justatheory.com,2009:/computers/databases/postgresql/neither-null-nor-not-null</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/4h7oUyjJuOs/neither-null-nor-not-null.html" />
<title type="text/plain">Neither NULL nor NOT NULL: An SQL WTF</title>

<issued>2009-07-28T19:16:00Z</issued>
<modified>2009-07-28T19:16:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>While working on <a href="/computers/databases/postgresql/results_eq.html" title="Committed: pgTAP Result Set Assertion Functions">result set testing
functions</a>, I ran into a bit of weirdness when comparing rows between two
cursors. I had code that looked more or less like this:</p><p><a href="http://justatheory.com/computers/databases/postgresql/neither-null-nor-not-null.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/4h7oUyjJuOs" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/postgresql/neither-null-nor-not-null.html</feedburner:origLink></entry>

<entry>
<id>tag:justatheory.com,2009:/computers/databases/postgresql/perl/pg-vs-perl-dev</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/wOhajGMsHoM/pg-vs-perl-dev.html" />
<title type="text/plain">PostgreSQL Development: Lessons for Perl?</title>

<issued>2009-07-13T21:16:00Z</issued>
<modified>2009-07-13T21:16:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I've been following chromatic's
<a href="http://modernperlbooks.com/mt/index.html" title="Modern Perl Books">new blog</a> since it launched, and have read with particular interest
his posts on the Perl 5 development and release process. The very long time
between releases of stable versions of Perl has concerned me for a while,
though I hadn't paid much attention until recently. There has been a fair
amount of discussion about what it means for a release to be “stable,” from,
among others, now-resigned Perl Pumpking
<a href="http://consttype.blogspot.com/2009/07/time-based-releases-in-open-source.html" title="ConstType: “Time-based releases in open source”">Rafael
Garcia-Suarez</a> and Perl 5 contributor
<a href="http://www.modernperlbooks.com/mt/2009/06/what-does-stable-mean.html" title="Modern Perl Books:“What does &quot;Stable&quot; Mean?">chromatic</a>.
Reading this commentary, I started to ponder what other major open-source
projects might consider “stable,” and how they manage stability in their
development and release processes. And it occurred to me that the Perl 5
code base is simultaneously treated too conservatively and -- more importantly
-- <em>not conservatively enough</em>. What open-source projects treat their
code highly conservatively?</p><p><a href="http://justatheory.com/computers/databases/postgresql/perl/pg-vs-perl-dev.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/wOhajGMsHoM" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/postgresql/perl/pg-vs-perl-dev.html</feedburner:origLink></entry>

<entry>
<id>tag:justatheory.com,2009:/computers/databases/postgresql/results_eq</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/xEMuvLCWZtg/results_eq.html" />
<title type="text/plain">Committed: pgTAP Result Set Assertion Functions</title>

<issued>2009-07-01T21:32:00Z</issued>
<modified>2009-07-01T21:32:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Regular readers will know that I've been thinking a lot about
<a href="/computers/databases/postgresql/comparing-relations.html" title="Thoughts on Testing SQL Result Sets">testing SQL result sets</a> and
how to <a href="/computers/databases/postgresql/result-testing-function-names.html" title="Need Help Naming Result Set Testing Functions">how to name result testing functions</a>,
and various <a href="/computers/databases/postgresql/set_testing_update.html" title="pgTAP Set-Testing Update">implementation issues</a>. I am very happy
to say that I've now committed the first three such test functions to the
<a href="http://github.com/theory/pgtap/tree/master/" title="Get the pgTAP source on GitHub">Git repository</a>. They've been tested
on 8.4 and 8.3. Here's what I came up with.</p><p><a href="http://justatheory.com/computers/databases/postgresql/results_eq.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/xEMuvLCWZtg" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/postgresql/results_eq.html</feedburner:origLink></entry>

<entry>
<id>tag:justatheory.com,2009:/computers/databases/postgresql/set_testing_update</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/01yKw9LbnIo/set_testing_update.html" />
<title type="text/plain">pgTAP Set-Testing Update</title>

<issued>2009-06-22T17:34:00Z</issued>
<modified>2009-06-22T17:34:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I've been thinking more
about <a href="/computers/databases/postgresql/comparing-relations.html" title="Thoughts on Testing SQL Result Sets">testing SQL result sets</a> and
how to <a href="/computers/databases/postgresql/result-testing-function-names.html" title="Need Help Naming Result Set Testing Functions">name functions</a> that
do such testing, and I've started to come to some conclusions. Some of the
constraints I'm looking at:</p><p><a href="http://justatheory.com/computers/databases/postgresql/set_testing_update.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/01yKw9LbnIo" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/postgresql/set_testing_update.html</feedburner:origLink></entry>

<entry>
<id>tag:justatheory.com,2009:/computers/databases/postgresql/result-testing-function-names</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/094OZnA4Ebo/result-testing-function-names.html" />
<title type="text/plain">Need Help Naming Result Set Testing Functions</title>

<issued>2009-06-08T00:06:00Z</issued>
<modified>2009-06-08T00:06:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I've been thinking more since I posted about <a href="/computers/databases/postgresql/comparing-relations.html" title="Thoughts on Testing SQL Result Sets">testing SQL result sets</a>, and I think I've settled on two sets of functions for pgTAP: one that tests two SQL queries (though you will be encouraged to use a prepared statement), and one to test two cursors. I'm thinking of naming them:</p><p><a href="http://justatheory.com/computers/databases/postgresql/result-testing-function-names.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/094OZnA4Ebo" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/postgresql/result-testing-function-names.html</feedburner:origLink></entry>

<entry>
<id>tag:justatheory.com,2009:/computers/databases/postgresql/comparing-relations</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/dcJjiWFnbFU/comparing-relations.html" />
<title type="text/plain">Thoughts on Testing SQL Result Sets</title>

<issued>2009-06-01T22:13:00Z</issued>
<modified>2009-06-01T22:13:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I've been continuing hacking on <a href="http://pgtap.projects.postgresql.org/" title="pgTAP: Unit Testing for PostgreSQL">pgTAP</a> in order to add a lot more
schema-testing functionality and a few other niceties. But back when I started
the project, I using it to write tests for <a href="/computers/databases/postgresql/citext-patch-submitted.html" title="CITEXT Patch Submitted to PostgreSQL Contrib">CITEXT</a>, which was great for my
sanity as I developed it, but proved a bit controversial. In a
<a href="http://archives.postgresql.org/pgsql-hackers/2008-07/msg00627.php" title="Tom Lane on pgsql-hackers: “Re: PATCH: CITEXT 2.0 v3”">pgsql-hackers post</a>, Tom Lane wrote:</p><p><a href="http://justatheory.com/computers/databases/postgresql/comparing-relations.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/dcJjiWFnbFU" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/postgresql/comparing-relations.html</feedburner:origLink></entry>

<entry>
<id>tag:justatheory.com,2009:/computers/databases/postgresql/pgtap-0.21</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/9RAjmRad6nE/pgtap-0.21.html" />
<title type="text/plain">pgTAP 0.21 Drops</title>

<issued>2009-05-29T01:20:00Z</issued>
<modified>2009-05-29T01:20:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I just dropped a new version of <a href="http://pgtap.projects.postgresql.org/" title="pgTAP: Unit Testing for PostgreSQL">pgTAP</a>, following a few marathon hack sessions since <a href="http://www.pgcon.org/2009/schedule/events/165.en.html" title="PGCon: “Unit Test Your Database!”">my talk at PGCon</a> (<a href="http://hosting3.epresence.tv/fosslc/1/watch/129.aspx" title="Unit Test Your Database—The Movie">movie here</a>, BTW). Actually, the new <a href="http://pgtap.projects.postgresql.org/documentation.html#`performs_ok+(+sql,+milliseconds,+description+)`" title="pgTAP Documenation: `performs_ok()`"><code>performs_ok()</code></a> function came about as I wrote the presentation, but all the rest came on the flight home and in the few days since. Not sure when I'll hack on it this much again (it's getting a bit big at 5,758 lines of PL/pgSQL and SQL).</p><p><a href="http://justatheory.com/computers/databases/postgresql/pgtap-0.21.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/9RAjmRad6nE" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/postgresql/pgtap-0.21.html</feedburner:origLink></entry>

<entry>
<id>tag:justatheory.com,2009:/computers/databases/postgresql/unit-test-your-database</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/tspQgbZwU0k/unit-test-your-database.html" />
<title type="text/plain">Unit Test Your Database!</title>

<issued>2009-05-21T21:12:00Z</issued>
<modified>2009-05-21T21:12:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Gave <a href="http://www.pgcon.org/2009/schedule/events/165.en.html" title="PGCon 2009: “Unit Test Your Database!”">my talk</a> at <a href="http://www.pgcon.org/2009/" title="PGCon 2009">PGCon</a> today. I felt that it went well, and was well-received. So here it is for everyone else, for posterity, thanks to SlideShare. Enjoy!</p><p><a href="http://justatheory.com/computers/databases/postgresql/unit-test-your-database.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/tspQgbZwU0k" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/postgresql/unit-test-your-database.html</feedburner:origLink></entry>

<entry>
<id>tag:justatheory.com,2009:/computers/databases/celko-at-yapc</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/Xoyto4xW0zk/celko-at-yapc.html" />
<title type="text/plain">Learn Mad Database Skillz at YAPC::NA 2009</title>

<issued>2009-05-13T22:45:00Z</issued>
<modified>2009-05-13T22:45:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>A few weeks ago, I
<a href="http://twitter.com/Theory/status/1576878753">twittered</a> that, in
my opinion, application developers should really learn how to use databases.
And by that I mean SQL, really. I know that a lot of app developers like to
use <a href="http://en.wikipedia.org/wiki/Object-relational_mapping" title="Wikipedia: “Object-relational mapping”">ORMs</a> to access the
database, so that you don't have to really think about it, but most ORMs are
written by people who <a href="http://david.loudthinking.com/arc/2005_09.html" title="Choose a single layer of cleverness">don't like databases</a>, don't
like SQL, haven't taken the time to learn it in any depth, and thus don't
write very good SQL. And even if they <a href="http://www.sqlalchemy.org/" title="SQLAlchemy: The Python SQL Toolkit and Object Relational Mapper">do
like SQL</a>, that usually means they provide a way for you to execute SQL
queries directly. The reason? Because the ORM does not really understand how
building more and more complex queries can have negative performance issues,
and that
<a href="http://en.wikipedia.org/wiki/There_is_more_than_one_way_to_do_it">there
is more than one way to do it</a>. It's pretty common to have to go back to
custom SQL to solve performance issues. So to solve those problems, you gotta
understand SQL.</p><p><a href="http://justatheory.com/computers/databases/celko-at-yapc.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/Xoyto4xW0zk" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/celko-at-yapc.html</feedburner:origLink></entry>

<entry>
<id>tag:justatheory.com,2009:/computers/databases/more-on-database-testing</id>
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/justatheory/pgsum/~3/CPPvlFOLZIw/more-on-database-testing.html" />
<title type="text/plain">More on Database Testing</title>

<issued>2009-05-11T19:59:00Z</issued>
<modified>2009-05-11T19:59:00Z</modified>
<author>
  <name>David E. Wheeler</name>
</author>
<content type="application/xhtml+xml" xml:base="http://justatheory.com" xml:lang="en-us" xml:space="preserve" mode="xml"><div xmlns="http://www.w3.org/1999/xhtml"><p>More thoughts on they whys and hows of database testing. I've been thinking about it quite a lot as I prepare for my <a href="http://www.pgcon.org/2009/schedule/events/165.en.html" title="PGCon: Unit Test Your Database!">PGCon presentation</a>, and as I've corresponded with a couple of PostgreSQL core developers, and I wanted to share some of my thoughts here. I also want to know more about why one might think that database testing is pointless or useless Let me know!</p><p><a href="http://justatheory.com/computers/databases/more-on-database-testing.html">Read More »</a></p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/justatheory/pgsum/~4/CPPvlFOLZIw" height="1" width="1" /></div></content>
<feedburner:origLink>http://justatheory.com/computers/databases/more-on-database-testing.html</feedburner:origLink></entry>


</feed>
