Thursday, August 26, 2004

google juice

I just feel the need to point out that I'm the number 1 result on google for "evil hax0rs".

That is all.

Why I Suck. Also, Gmail Invites!

Yeah, I know, no posts for ages (there's been more posts saying "sorry, no posts" than there have been actual posts in recent weeks). Work sucks, I'm stupidly busy trying to get an under-prepared and under-tested website live, there's just been no time for blogging. Once the current storm blows over there'll be posts, I promise.

In unrelated news, I've got a couple of Gmail invites to give away; first people to comment will get em.

Wednesday, August 04, 2004

Postgres - GRANT on all tables in a DB/Schema

So I was trying to figure out a way to grant all permissions on a postgres DB to a certain user, but the (seemingly) obvious grant all on database foo to bar didn't result in the desired select/update/insert permissions being set.

A lengthy google later and some poking around in groups.google.com found me this thread that gave me a nice easy query to get the statements I wanted, and in the interests of documenting findings (and so that I can find this tip again later when I forget it) I'm posting it here:

select 'grant all on '||schemaname||'.'||tablename||' to bar;' from pg_tables where schemaname in ('baz', 'quux') order by schemaname, tablename;
The link to that thread has other queries for views, sequences & functions. Nice work, John Sidney-Woollett, whoever you are.

So much to blog about...

...so little time. I'm heaps busy with work and uni at the moment, so I've got bugger all time to post, but I'm queueing up quite a few posts in my head. More updates coming soon, I promise.

(This post is obviously a note to the huge amount of readers I have - the ones who all hang on my every word, and live for my next blog post. Or not.)