Обсуждение: commit changes?

Поиск
Список
Период
Сортировка

commit changes?

От
"Tracey, Michelle"
Дата:

I have recently made SEVERAL changes to a database using PGAdmin III.  The database is tied to a website, and when I try to query the database, my changes are not there. 

 

I’m currently trying to get the support team to verify that my datasource is actually pointing to the same database I am, but I wondered about a couple of things:

 

1) I did all the changes as a user who was not the table owner, just one with access to the tables.  Could this be why the queries are coming back without my columns?

 

2) I’m not aware of an equivalent option in PGAdmin III that performs a ‘commit’.  Is this necessary in order for my changes to go through?  The odd thing is that I’ve closed my database connection and reopened it, so the changes are SOMEWHERE.

 

I tried searching your archive but none of the search terms I used came back with any matching questions.  I’m sorry if this turns out to be a duplicate question.  I’m not the best at coming up with search terms.

Re: commit changes?

От
Josh Kupershmidt
Дата:
Disclaimer: I don't actually use pgAdmin myself, so my reply is based
on minimal googling.

On Tue, Aug 18, 2009 at 5:57 PM, Tracey,
Michelle<Michelle_Tracey@sra.com> wrote:
> 1) I did all the changes as a user who was not the table owner, just one
> with access to the tables.  Could this be why the queries are coming back
> without my columns?

If you lack the necessary privileges to INSERT or UPDATE the table in question,
pgAdmin should show you an error window saying something like
"permission denied for ... ". Otherwise, your modifications should be
committed.

> 2) I’m not aware of an equivalent option in PGAdmin III that performs a
> ‘commit’.  Is this necessary in order for my changes to go through?  The odd
> thing is that I’ve closed my database connection and reopened it, so the
> changes are SOMEWHERE.

pgAdmin runs in "auto commit mode", similar to the behavior of the command-line
psql client. This means each query you execute implicitly runs inside its own
transaction. See this discussion for more info:
http://www.nabble.com/PGAdmin-Auto-commits--td19778774.html

 - Josh