Tag Archives: database

Setting up Oracle Express On A Mac Using Debian and VMWare Fusion

The goal was to set up a Debian Linux Virtual Machine, with a static IP address, acessible via name through the host operating system. (so you can ssh to ‘vm1′ rather than having to figure out what it’s IP address is, or worse, having to run the Debian desktop tools on the virtual machine.) Then, [...]
Posted in Software Development | Also tagged , , , , | Leave a comment

using explain to inteligently create indecies in PostgreSQL

I often write these blog posts as much so I will remember a technique as to tell the world about it.  I can’t take any credit for this one, had to have it explained (no pun intended) to me. So… let’s say you have a query: select foo from table1 where bar = 'some value' [...]
Posted in Software Development | Also tagged | Leave a comment

Simple Postgres Type Cast

I recently did a select similar to the following, where a subquery grabs some ids, and then a main query uses them: select * from attributes where id in ( select id from documents where owner = 'sam' ); But I got the following error: ERROR:  operator does not exist: integer = text HINT:  No [...]
Posted in Software Development | Also tagged , | Leave a comment

Preventing Hair Loss w/ Database Transactions

Warning, this is fairly rudimentary, but useful all the same. Have you ever sat down at a database prompt to update 1 value, typed the query, hit enter, and gotten back “4000 Entries Updated”.   It’s fun, a good way to shorten your life, and loose all your hair. What you can do, at least in [...]
Posted in Software Development | Also tagged , | Leave a comment

Authentication and Postgres

For a given web app, the database and web server may reside on the same machine.  Apache runs as webserver-user (or similar) and connects on a local socket to postgres.  Postgres on my machine, is not configured to listen on any ports, rather it is configured to authenticate by ‘ident sameuser’ on local sockets.  Therefore, [...]
Posted in Software Development | Also tagged , | Leave a comment