Re: How do I save my tables? - Mailing list pgsql-novice

From Kimberly Israel
Subject Re: How do I save my tables?
Date
Msg-id 1379428848.27629.YahooMailNeo@web161605.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: How do I save my tables?  (David Johnston <polobo@yahoo.com>)
Responses Re: How do I save my tables?  (David Johnston <polobo@yahoo.com>)
List pgsql-novice
Thanks for your advice everyone - I'm  getting ready to try it again and keep detailed track of the steps, but I noticed under Options->Query tool->Query editor that "Enable Auto ROLLBACK" is checked by default.  Is this the opposite of auto-commit?  Would unchecking it then put me into auto-commit?


From: David Johnston <polobo@yahoo.com>
To: pgsql-novice@postgresql.org
Sent: Tuesday, September 17, 2013 10:22 AM
Subject: Re: [NOVICE] How do I save my tables?

Thomas Kellerer wrote
> Kimberly Israel, 17.09.2013 14:33:
>> Yesterday I created several tables and was able to run queries that
>> combined data from more than one table at a time, but when I reopened
>> pgAdmin III today, the database I had created was there, but the
>> tables were all gone.  I tried to save my work, but what got saved
>> was a .sql file that seems to only contain the code for creating the
>> database.  Basically what I need to know is how do I put my tables
>> somewhere where I'll be able to continue working with them after a
>> period of having the computer off?
>
> This all sounds like you forgot to commit your changes.
>
> When you have auto-commit disabled you need to commit every change you
> make to the database - including a CREATE TABLE statement.

All true; and while I didn't actively ponder this scenario I find it
unlikely given the log file.  Given all of the syntax errors that we saw I
would have expected to see a large number of  (paraphrased) "current
transaction is aborted; ignoring all statements until Rollback has been
issued" messages.

Unless the OP was re-creating the table every time a typo occurred those
tables had to have been committed at some point during the session.

Also, I do not think the OP likely turned off auto-commit and so if that is
the default mode I would presume that said default is still in effect.

The temporary table thought is pretty much just as improbable but nothing
else readily comes to mind.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/How-do-I-save-my-tables-tp5771217p5771257.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.


--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice


pgsql-novice by date:

Previous
From: David Johnston
Date:
Subject: Re: How do I save my tables?
Next
From: David Johnston
Date:
Subject: Re: How do I save my tables?