[NEW] trailing junk after numeric literal
Unanswered
Asian black bear posted this in #help-forum
Asian black bearOP
I created a table that look like this
and inserted the data that look like this
by this command
but I keep getting error
Why is that ?
CREATE TABLE IF NOT EXISTS users (
id UUID DEFAULT uuid_generate_v4() PRIMARY KEY,
name VARCHAR(255) NOT NULL,
email TEXT NOT NULL UNIQUE,
password TEXT NOT NULL
);
and inserted the data that look like this
id: '410544b2-4001-4271-9855-fec4b6a6442a',
name: 'User',
email: 'user@nextmail.com',
hashedPassword: '$2b$10$VAkfGkDy9tY//t8ilYyOf.eyUfIzgOqHuRmkfSmy/6nWHA3w8gVnu'
by this command
INSERT INTO users (id, name, email, password)
VALUES (${user.id}, ${user.name}, ${user.email}, ${hashedPassword})
ON CONFLICT (id) DO NOTHING;
but I keep getting error
error: trailing junk after numeric literal at or near "410544b2"
Why is that ?