[WYLUG-help] PostgreSQL and SQL-Ledger

Stephen steve at patter.mine.nu
Sat Jun 3 20:50:08 BST 2006


On 03 Jun 06, Mike Goodman (mike.goodman at zen.co.uk) wrote:
> I assumed that would have rid me of the earlier pgsql user I had created
> and all of the databases would have gone. No such thing. Trying to
> create a new dataset produces the error:
> 
> Error!
> CREATE SEQUENCE id start 10000
> ERROR: relation "id" already exists

Sounds like it left the old database in when you removed it.

The postgres command line (psql) should let you delete (drop) the database, 
\l  - list databases available
\c  - connect to another database
\d  - by itself, list tables. With a table name, describe the table
 
> Can anyone tell me how I can find out who or what owns sequence id start
> 10000 and if I can delete it? I'm assuming it's something to do with
> pgsql

The sequence is a counter for a column of autonumbering IDs, so it'll be
specific to 1 table.

Postgres normally leaves databases behind when you uninstall it, though it can
be reconfigured to delete them with dpkg-reconfigure.

-- 
Stephen Patterson :: steve at patter.mine.nu :: http://patter.mine.nu/
GPG: E3E8E974 :: Jabber: patter at jabber.earth.li 
"At night, the razor weasels come."



More information about the Wylug-help mailing list