[faq] Working with PostgreSQL

Artist radio, genre radio & related artists. A Subsonic server for music nerds.

Moderator: moderators

[faq] Working with PostgreSQL

Postby hakko » Thu Mar 21, 2013 9:34 pm

The metadata of all your files, together with information from last.fm and MusicBrainz, is stored in PostgreSQL.

You can access this information at any time (even when Subsonic/MusicCabinet is running), to generate reports, update data and so on.

The easiest way of doing this is using the tools that come with your PostgreSQL installation (Linux users might need to run something like sudo apt-get install pgadmin3). There's a command line tool called psql, and a graphical interface called pgAdmin III.

When you start psql (path will vary depending on platform and version), supply the parameters -U postgres -d musiccabinet to work with the musiccabinet database.

pgAdmin III
When you start pgAdmin, the interface is initially very empty. Right-click PostgreSQL 9.1 (localhost:5432) in the Object browser, and press Connect. Then expand the tree from Databases to musiccabinet. Select musiccabinet, and press the SQL icon next to the recycle bin icon in the top row. This will open a new window where you can run SQL statements, to retrieve and update information in the database.

Note: be careful and do this on your own risk! Database deletion statements are irreversible.
MusicCabinet developer
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Return to MusicCabinet

Who is online

Users browsing this forum: No registered users and 3 guests