I build my tables, but when I want to enter data in the table I get a syntax error I cannot explain. It seems that it is about the spaces between words. If I write MilkyWay without space, the syntax error goes to the next space in the data. I have no idea what I do wrong.
Here is the code I entered in the Terminal:
camper: /project$ psql --username=freecodecamp --dbname=postgres
Border style is 2.
Pager usage is off.
psql (12.17 (Ubuntu 12.17-1.pgdg22.04+1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.
postgres=> CREATE DATABASE universe;
CREATE DATABASE
postgres=> \c universe
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
You are now connected to database "universe" as user "freecodecamp".
universe=> CREATE TABLE galaxy(galaxy_id SERIAL, name VARCHAR(40) NOT NULL UNIQUE, description TEXT, galaxy_type VARCHAR(40) NOT NULL, constellation VARCHAR(40));
CREATE TABLE
universe=> ALTER TABLE galaxy ADD PRIMARY KEY(galaxy_id);
ALTER TABLE
universe=> CREATE TABLE star(star_id SERIAL, name VARCHAR(40) NOT NULL UNIQUE, description TEXT, age_in_millions_of_years INT, distance_from_earth_in_ly NUMERIC(10,2), galaxy_id INT REFERENCES galaxy(galaxy_id) NOT NULL);
CREATE TABLE
universe=> ALTER TABLE star ADD PRIMARY KEY(star_id);
ALTER TABLE
universe=> CREATE TABLE planet(planet_id SERIAL, name VARCHAR(40) NOT NULL UNIQUE, description TEXT, planet_type VARCHAR(40), distance_from_sun_in_km INT, has_life BOOLEAN, star_id INT REFERENCES star(star_id) NOT NULL);
CREATE TABLE
universe=> ALTER TABLE planet ADD PRIMARY KEY(planet_id);
ALTER TABLE
universe=> CREATE TABLE moon(moon_id SERIAL, name VARCHAR(40) NOT NULL UNIQUE, description TEXT, is_spherical BOOLEAN, planet_id INT REFERENCES planet(planet_id) NOT NULL);
CREATE TABLE
universe=> ALTER TABLE moon ADD PRIMARY KEY(moon_id);
ALTER TABLE
universe=> CREATE TABLE universe(universe_id SERIAL, name VARCHAR(40) NOT NULL UNIQUE, is_proven BOOLEAN);
CREATE TABLE
universe=> ALTER TABLE universe ADD PRIMARY KEY(universe_id);
ALTER TABLE
universe=> INSERT INTO galaxy(name, description, galaxy_type) VALUES (‘Milky Way’, ‘Galaxy containing the sun and the earth. All stars that can be seen with the naked eye’, ‘barred spiral’);
ERROR: syntax error at or near "Way’"
LINE 1: ...xy(name, description, galaxy_type) VALUES (‘Milky Way’, ‘Gal...
^
universe=>