I recently needed to convert a PostgreSQL UUID to bytea, and couldn't find any quick one-liners on the web. So here it is, for your enjoyment: