Reputation: 148
Im trying set up postgresql but every time I try make a Table:
CREATE TABLE player (discord_id, game_id, game_username)
It does nothing no errors. Then when I do \dt
to list tables it says this:
roblox=# \dt
Did not find any relations.
Why can't I create a table?
Upvotes: 1
Views: 49
Reputation: 2328
You need to set the type you want the columns to be in Postgres. Postgres doesn't assume what type of data you are passing it unless you explicitly tell it.
CREATE TABLE player (discord_id int, game_id int, game_username varchar);
For example. Here are the docs on this function https://www.postgresql.org/docs/9.1/sql-createtable.html
Here is a list of all the data types in Postgres
Upvotes: 2