You're tracking payments. Payments can come in several forms, and you want to
make sure each payment has exactly one form.
How to do this?
Read on...
Continue reading "Multiple Inheritance" »
Sunday, August 30. 2009
Helpful help
You can tell a lot about someone's experience in a field by the questions they ask.
When somebody is obviously new to the topic, whatever it is, you can help... Continue reading "Helpful help" »
When somebody is obviously new to the topic, whatever it is, you can help... Continue reading "Helpful help" »
Friday, August 28. 2009
Your Tools, Their Server
You've set up psql just how you like it. Your editor, also
customized, your prompt, and it's even a pretty advanced version of psql with
lots of goodies. You've got more tools than psql, and some of them might be
proprietary and/or GUI tools. Ah, the joy of customization!
Now, you need to talk to somebody else's database. You could spend time
either adjusting to using their setup or installing yours. This prospect
fills you with dread, and time is of the essence.
Continue reading "Your Tools, Their Server" »
customized, your prompt, and it's even a pretty advanced version of psql with
lots of goodies. You've got more tools than psql, and some of them might be
proprietary and/or GUI tools. Ah, the joy of customization!
Now, you need to talk to somebody else's database. You could spend time
either adjusting to using their setup or installing yours. This prospect
fills you with dread, and time is of the essence.
Continue reading "Your Tools, Their Server" »
Wednesday, August 26. 2009
Key Tree
Ever wondered what tables have foreign keys to a given table, and which ones to those, and so on?
Read on! Continue reading "Key Tree" »
Read on! Continue reading "Key Tree" »
Wednesday, August 19. 2009
Choose Your Primary Key Wisely
Reason why schema design is really, really important number 187:
SSN is not a fit candidate as a primary key in a "person" table. Why not?
This is why not.
Remember, kids,
Just Say No
to hasty schema design.
SSN is not a fit candidate as a primary key in a "person" table. Why not?
This is why not.
Remember, kids,
Just Say No
to hasty schema design.
Monday, August 17. 2009
VARCHAR(n) Considered Harmful
So you're designing a database, and you think to yourself, "Hey, I'll use
VARCHAR(n) for some of my constraints!" Now, you have two problems.
Continue reading "VARCHAR(n) Considered Harmful" »
VARCHAR(n) for some of my constraints!" Now, you have two problems.
Continue reading "VARCHAR(n) Considered Harmful" »
Friday, July 17. 2009
CREATE OR REPLACE LANGUAGE
Don't you wish that worked in a deployment script? Here's one almost as simple that does:
To clean up, you can do:
CREATE OR REPLACE FUNCTION make_plpgsql()Oh, and it's idempotent too. No need to worry whether it's been done before
RETURNS VOID
LANGUAGE SQL
AS $$
CREATE LANGUAGE plpgsql;
$$;
SELECT
CASE
WHEN EXISTS(
SELECT 1
FROM pg_catalog.pg_language
WHERE lanname='plpgsql'
)
THEN NULL
ELSE make_plpgsql() END;
To clean up, you can do:
DROP FUNCTION make_plpgsql();
Posted by David Fetter
at
02:53
Wednesday, July 1. 2009
WITH (so much drama in the CTE)
By now, you've probably seen that PostgreSQL 8.4 can produce Mandelbrot sets
like the one below, but what are Common Table Expressions really about?
Continue reading "WITH (so much drama in the CTE)" »
like the one below, but what are Common Table Expressions really about?
Continue reading "WITH (so much drama in the CTE)" »
Saturday, June 6. 2009
Materialized Views Performance Tips
So you don't feel your clients' time is best spent on scanning a multi-million row table, and you've decided to materialize some views. Here are some principles to keep in mind as you go forward...
Continue reading "Materialized Views Performance Tips" »
Thursday, May 7. 2009
PGX!
Q: Where can you find decades of PostgreSQL expertise all in one spot?
A: PostgreSQL Experts, Inc.! Continue reading "PGX!" »
A: PostgreSQL Experts, Inc.! Continue reading "PGX!" »
Saturday, April 4. 2009
The Mange Guide to Databases: First Impressions
Big Eyes: Check
Tentacles: Nope (whew!)
Tentacles: Nope (whew!)
Wednesday, March 4. 2009
Mutt Majordomo Moderation, Modified
It turns out you don't even need vim for this part. Alvaro pointed out that mutt's native capability, along with Perl, can make moderation a one-keystroke operation. I've updated the script for strict-cleanliness and Perl 5.10 grammar.
Continue reading "Mutt Majordomo Moderation, Modified" »
Moderating Majordomo Lists with Vim and Mutt
So, you have the pleasure of moderating a high-traffic majordomo list, and you want to speed up the action you take once you've scanned the message in your in box. Here's a couple of things to put in your .vimrc to help:
Continue reading "Moderating Majordomo Lists with Vim and Mutt" »
Monday, February 23. 2009
Trip Report: FOSDEM 2009
Why it's important to go in person, reasons #187 and #188:
- Spoke with Stéphane Schildknecht about his "little scripts" for controlling Slony clusters, which resulted in a pgfoundry project. Go, Stéphane!
- Discovered that Gevik Babakhani speaks fluent Farsi and was happy to become a point of contact for the Tehran PUG. Expect good stuff from there Continue reading "Trip Report: FOSDEM 2009" »
- Spoke with Stéphane Schildknecht about his "little scripts" for controlling Slony clusters, which resulted in a pgfoundry project. Go, Stéphane!
- Discovered that Gevik Babakhani speaks fluent Farsi and was happy to become a point of contact for the Tehran PUG. Expect good stuff from there Continue reading "Trip Report: FOSDEM 2009" »
« previous page
(Page 2 of 6, totaling 80 entries)
next page »