The goal of this project is to create a PostgreSQL extension for storing and retrieving chess games using Portable Game Notation (PGN), Standard Algebraic Notation (SAN), and Forsyth–Edwards Notation (FEN).
- PGN (Portable Game Notation): Used to record full games.
- SAN (Standard Algebraic Notation): Represents moves in PGN.
- FEN (Forsyth–Edwards Notation): Stores board states.
Before installation, make sure these packages are installed on your device:
sudo apt-get install postgresql-16
sudo apt-get install postgresql-client-16
sudo apt-get install libpq-dev
sudo apt-get install postgresql-server-dev-16
Create a user for yourself:
sudo -u postgres createuser -e your_username
sudo -u postgres psql -c "ALTER USER your_username SUPERUSER;"
Install the PostgreSQL chess extension using the Makefile command:
make chess
Once the PostgreSQL chess extension is installed, submit SQL files to the chess database using the psql
tool:
psql chess < your_sql_file.sql
Or you can directly interact with the database using the psql
tool.