PDA

View Full Version : editing the tables in pgadmin



tobytoby
08-06-2010, 02:27 PM
i wanted to get all my notes to autorate again for the ones which i changed manually. So I changed I deleted the column, added it again with a default of -1. is this going to have any problems or performance issues?

netsrak
08-07-2010, 07:18 AM
I don't really understand what you did.
If HM is still working it should be fine.

tobytoby
08-07-2010, 07:26 AM
I don't really understand what you did.
If HM is still working it should be fine.


Hello,

Sorry I didn't really word it that well. I basically went into PGAdmin and opened up the table hemplayernotes. I then deleted the last column, and immediately added a column with the same name but set the default to -1. The would mean that all the icons I have changed would go back to being auto rated by HEM. Hopefully you understand now :)

netsrak
08-07-2010, 07:38 AM
Wow, never ever delete a column in the database.
You can change values in a column (by an update) but don't change the database structure.

If HM is still working you are lucky.
And if it does i don't think you will have performance problems.

You might do a reindex of your database via pgadmin->maintenance.

tobytoby
08-07-2010, 09:54 AM
Wow, never ever delete a column in the database.
You can change values in a column (by an update) but don't change the database structure.

If HM is still working you are lucky.
And if it does i don't think you will have performance problems.

You might do a reindex of your database via pgadmin->maintenance.

I tried to find out how to update the entire entries in the column but had no luck. I guess I was lucky :D

Can you give me a link to a update readme / tutorial?

netsrak
08-07-2010, 11:13 AM
The sql syntax? It should be somewhere in the postgresql documentation: PostgreSQL: Documentation: Manuals: PostgreSQL 8.0: Tutorial (http://www.postgresql.org/docs/8.0/static/tutorial.html)


In general the syntax is:
update tablename
set columnname = value
where columnname = value2