dbTalk Databases Forums  

Closing a database

comp.databases.postgresql comp.databases.postgresql


Discuss Closing a database in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Adam Smith
 
Posts: n/a

Default Closing a database - 09-18-2007 , 07:09 AM






Hello,
Been away from PostgreSQL for a while and probably needs retraining in
the basics.

How do I close a database? Can't even find it in the Manual

Case:
testdb=#
testdb=# EXIT;
ERROR: syntax error at or near "EXIT" at character 1
LINE 1: EXIT;
^
testdb=#
testdb=# QUIT;
ERROR: syntax error at or near "QUIT" at character 1
LINE 1: QUIT;
^
testdb=#
testdb=# END;
WARNING: there is no transaction in progress
<p>COMMIT</p>
testdb=#

quit works in MySQL

Stuck in testdb

Reply With Quote
  #2  
Old   
Ben Finney
 
Posts: n/a

Default Re: Closing a database - 09-18-2007 , 06:30 PM






Adam Smith <adamsmith (AT) econ (DOT) com> writes:

Quote:
How do I close a database? Can't even find it in the Manual
You don't "close a database"; you close your connection to
it. Quitting the client is probably the simplest way.

For psql, the '\q' command is "quit". It also quits when it receives
the end-of-text signal (Ctrl+D on Unix).

Use '\?' to see the commands you can use to interact with psql.

--
\ "Never use a long word when there's a commensurate diminutive |
`\ available." -- Stan Kelly-Bootle |
_o__) |
Ben Finney


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.