Setting up PostgreSQL for use with a Django database — without errors

As a technical writer, there’s something that frustrates me very much — instructions that just don’t work. It really grinds my gears. When I write instructions on how to accomplish a task, something I always make sure to do is actually test the instructions to make sure that they work and lead to the expected result, because when I am following specific instructions and things don’t work it really frustrates me as someone who has ADHD.

So I’m setting up a Django project, and naturally I wanted to use PostgreSQL with the project.  I just don’t like SQLite, it’s something I’m forced to use with Calibre and it causes problems with database portability — I have to have the application on the same host as the database and that’s a pain in the ass.

So I modify the venv in which Django is running and install psycopg2-binary, which has the PostgreSQL bindings for Django, and modify the settings.py file to point to the correct database.

Then I went online and the instructions everywhere are always this:

Log into PostgreSQL as the root user (e.g. psql -U postgres)
In psql:
CREATE DATABASE new_database;
CREATE USER new_user WITH PASSWORD 'newpassword';
GRANT ALL PRIVILEGES ON DATABASE new_database TO new_user;

This does not work! Well, it doesn’t work with PostgreSQL 16 and Django 6. When you go back to your django project, make the migrations, and migrate the project, you end up with this error:

psycopg2.errors.InsufficientPrivilege: permission denied for schema public

The worst part of this is, it’s not a new problem. After searching online, this is something that’s been pointed out for several years, and yet none of the “AI-powered search results” seem to be aware of this. It’s really not changing my opinion that search engine-generated “AI summaries” are crap that no one has ever verified — like most AI generated slop out there.

The missing instruction is that you have to, as the postgres user, log into the new database and ALSO grant the privileges to the public schema of the new database to the new user.

To do this, you must do this in a separate operation from the one that created the database:

Log into the new PostgreSQL database as the root user (e.g. psql -U postgres -d new_database)
In psql,
GRANT ALL PRIVILEGES on SCHEMA public TO new_user;

Once you do this, you can perform the database migrations as expected.

It’s really annoying that I even have to write this.  Most search engines now will provide you with instructions that don’t work, and this is directly  due to their decision to pollute their search results with unverified AI slop that just doesn’t work. It’s very frustrating and will probably continue being an issue as long as tech companies continue to insist on burdening the rest of us with this “artificial intelligence” monster they’ve sunk billions/trillions of dollars into, while laying off hundreds of thousands of employees and essentially killing the software job market.

Ghost jobs – old and busted. Ghost interviews – new hotness?

Ghost jobs are a thing, but this week I had a… ghost interview.

Got a call last week about a job for which I had applied. Got a screening interview scheduled on Monday (August 24th) and was amped up for it. It was a Teams call, so I sign on 5 minutes before the interview, and waited.

And waited, and waited. No one else came on the call. I asked in the meeting chat whether the call was mis-scheduled — the person who created the meeting was in Kansas but the other person invited to the meeting was in my time zone. I also emailed the person who booked the meeting. So, not having anything else to do, I waited and browsed the internet during that time. An hour passed, then another 15 minutes, and I signed out.

I then emailed both persons in the meeting to inform them of this and said I was open to rescheduling the meeting anytime this week. I then received an automated response saying the other person on the call was on vacation until Tuesday.

However it’s now been two days and no response. Yes, I checked my “spam” folders just in case. This is not a small company, this is a major company in Canada with a sizeable presence in the USA as well.

It strikes me as rather bizarre that a company would call me to schedule a meeting and then ghost me. It seems really unprofessional. And, for me, quite depressing.

Canada Revenue Agency — please do better. Your web site is broken.

So I saw a job ad on LinkedIn announcing that the CRA was hiring new personnel to answer phones for people with questions about their taxes. Being that I’m someone looking for a job, I decided to go to the CRA web site and submit my candidature. Several days later they still don’t have it, nor — as far as I can tell — do they have anyone’s candidature since posting the ad, and the weird thing is that they seem to be blissfully unaware of this. Let me walk you through the process and you’ll see why.

First, I went to the CRA web site and looked for the “careers” link. Job opportunities link

I click on the Job opportunities link, which takes me to the careers page, where I see a Candidate Registration link, which I click.

Submit your candidature

In the resulting form I select that I’m a member of the general public, and click on the data privacy statement checkbox. So far, so good.

Candidate registration 1

In this second Candidate Registration page (experienced UX writers will share my annoyance at having two consecutive pages with the same name, but let’s ignore that) I enter the appropriate data and click on the Next button.

Candidate registration 2

And voila! an error message. “The session has timed out”.

Session error (029)

But I did not let this deter me. I clicked on the Exit button, which took me back to the CRA front page, completed the process again, and this time… I now got a different error, “Our services are not available at this time”.

Error 010 - service is not available

I shared this last error message in the LinkedIn ad for the recruiting drive and haven’t heard anything from them since. The ad appeared on Tuesday (IIRC) and the web site SNAFU is still there.

So, dear Canada Revenue Agency, if you see no submissions for your recruiting drive don’t conclude it’s because nobody wants to answer people’s questions about taxes. It’s because your web site just. doesn’t. work.

Maybe you guys should be concentrating to hiring people to make sure that your web sites are usable instead of obsessing about killing public sector jobs, because having fewer and fewer staff isn’t going to fix things on your end.

The closest I’ve come to death

This is a little story about the closest I’ve come to dying. So far. Which also explains why I tend to drive gingerly when it’s snowing.

I was coming back home from work in dad’s (manual) Ford Tempo on December 21st 1991. It was snowing moderately hard in Quebec City and I felt I just knew that road so well because I drove it at least 3x a week and let my confidence get the better of me, also I was heading to my dad’s Xmas dinner and we had guests over. It was on Du Vallon in Quebec City, which really wasn’t built to be a proper highway as it’s got a big kink to get around the support for an overhead highway that crosses it. Anyway I get past a guy and decide that kink would be a good spot to get back in the right lane, so I stupidly push down on the clutch and let inertia get me back to the slow lane… on snow.

That’s when I learned a very valuable lesson about liftoff oversteer. The rear of the car swings around and I’m just a passenger now. I seize the steering wheel with all my strength and close my eyes because I know it’s going to be a big one. Somehow a part of the car hits the guardrail, I feel I’m no longer in touch with the ground, and the car lands heavily on the passenger side.

By some miracle the car stops neatly in the right lane and everyone around successfully gets around me. I just sit there in a bit of shock and realize I’m still alive. I don’t even realize that the crash caused my glasses to whip off my face — unfortunately they’re on the road way right under me, and as I undo my seatbelt my foot lands heavily on them. My arm hurts a bit, just because I was holding on to the wheel so tight I tore my bicep a little bit. I find a way to pull myself out through my side window and by then a lot of people have already stopped and are helping out. Then a police car comes and eventually takes me home.

Now I had a close friend who was working at the same place and normally I would have given her a ride home, but that day her shift ended later so I was alone in the car, which was definitely a good thing because she would have been seriously injured. And that’s about as close as I came to dying but somehow walked away with barely a scratch (and broken glasses).