Re: How do I save my tables?

From: Kimberly Israel <kac15228(at)yahoo(dot)com>
To: David Johnston <polobo(at)yahoo(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: How do I save my tables?
Date: 2013-09-17 14:40:48
Message-ID: 1379428848.27629.YahooMailNeo@web161605.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)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.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message David Johnston 2013-09-17 14:55:01 Re: How do I save my tables?
Previous Message David Johnston 2013-09-17 14:22:25 Re: How do I save my tables?