I am not a DBA, but recently I have to upgrade Postrges minor version with a security update. This is not either a tutorial or some best practice, but some small snippet of the command you will need, before doing…
I am not a DBA, but recently I have to upgrade Postrges minor version with a security update. This is not either a tutorial or some best practice, but some small snippet of the command you will need, before doing…
Assumptions My primary focus is not on Matlab, but I used it for a while in the Uni. I have to support connecting Matlab installed on Windows machine with Postgres 9.2 database. I used the Matlab command window, so this…
I noticed a column in Postgres which is varchar, but has geo information and should be geometry. Here are short steps to do in order to convert the data in geometry instead of varchar. 1. Rename the column to the_geom_1…
This snippet is particularly for Postgres (that database I am currently using and didn’t tested it in other, but should work. At most you have to change the syntax a little). I have to remove duplicated entries for a duplicated_column…
SQL code snippet to reset the primary key sequence in Postgres database table: SELECT setval(‘sequence_name’, 1); UPDATE table_name SET primary_key_id = DEFAULT;