Skip to content

Error when loading data #2

Description

@songwu0001

Hi there,

I created the stackoverflow_dba database using schema.sql, then the foreign key error was reported when loading the data.

ERROR: Key (postid)=(22) is not present in table "posts".insert or update on table "votes" violates foreign key constraint "votes_postid_fkey"

ERROR: insert or update on table "votes" violates foreign key constraint "votes_postid_fkey"
SQL state: 23503
Detail: Key (postid)=(22) is not present in table "posts".

So should I use schema_nofk.sql instead?

Thanks very much!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions