Quick note about how to backup and restore a PostgreSQL database from the command line. Things to know: – Name of the database you want to backup; – Username and password of the database user; – your way around a command line – at least how to open it or who to ask to open… Read More »
So you screwed up with your ninja manual inserts on some lost and forgotten table. In such a way that when your shiny django backoffice gives you a fullscreen yellow error about duplicate keys. What now? Well, you read and i will show you how to circumvent the system (well, kind of).
A very simple problem im sure all postgreSQL users/devs have come across one time or the other: So you have your shiny PostgreSQL Database in some nice server somehwre and you want to manually make some changes. Say you have tons of records on some table and want to replace a word with a different… Read More »
Just to keep things organized, i will leave this info here for one more hit on the interwebs. There are tons of parameters and tips and tricks, but i will just leave the bare basics. After the jump.
If you want to find out the version of your installed PostGis, you do this: You get a row like this: POSTGIS=”1.5.5″ GEOS=”3.3.5-CAPI-1.7.5″ PROJ=”Rel. 4.6.1, 21 August 2008″ LIBXML=”2.7.8″ USE_STATS Versions displayed will depend on your instalation, of course. External links: – PostGIS website
Ran into some PostgreSQL problems again (what else is new?), this time regarding the password for the windows user postgres creates. I was replacing postgreSQL x64 for the x86 version to fix some weborb/php/lots of other stuff problems. I uninstalled my x64 version, it left the data folder and user, and when it was reinstalling,… Read More »
This is a recurring problem i had. For some reason (which i later found out), i couldnt get my php scripts to connect to postgresql. The scripts borked at, for example, pg_connect() (unable to find the function, blah blah). First off, usually php doesnt come configured to run the postgresql dll out of the box… Read More »
This time its a second version of what i already posted, but might help some poor soul out there (and me, since i keep forgetting stuff). UPDATE “Patrimonio” SET x=st_x(“Morada”.geometry), y=st_y(“Morada”.geometry) FROM “Morada” WHERE “Patrimonio”.morada_id = “Morada”.”id” This example is specifically for PostgreSQL, acting on a geometry point column, but can easily, or almost directly,… Read More »