Tuesday, August 28, 2007

Postgres Tip List

Here's a really handy list of Postgres tips. It takes just a few minutes to browse through it, but has quite a few gems to offer.

Here's an example:

Ditch All Output Of Query by xinu on Jan 12, 2005 10:25 AM

If you want to run a query or a function and ditch the output, you can do something like this:

xinu=# select my_void_function() \g /dev/null

So, if you want to redirect the output of a command you can say: \g /path/to/a/file instead of the usual ;.

No comments:

Post a Comment