-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Unable to load sample data to PostgresDB when using Docker. Getting the error below when running docker run -p 5432:5432 sample-postgres-library
psql:/docker-entrypoint-initdb.d/1-library-schema-and-data.sql:174: ERROR: type "library.books" does not exist
2025-05-06 18:54:25.490 UTC [61] ERROR: type "library.books" does not exist
2025-05-06 18:54:25.490 UTC [61] STATEMENT: CREATE FUNCTION library.get_books_by_author(author_id_param integer)
RETURNS SETOF library.books
LANGUAGE plpgsql
AS $function$
BEGIN
RETURN QUERY
SELECT * FROM library.books b
WHERE b.id IN (
SELECT ab.book_id
FROM library.author_book ab
WHERE ab.author_id = author_id_param);
END
$function$;
jugjig-jirawan and am-MongoDB
Metadata
Metadata
Assignees
Labels
No labels