• Resolved velocityzen

    (@velocityzen)


    Hello
    My plugin tried to post some stuff and I’ve got:

    WP_Error Object ( [errors] => Array ( [db_insert_error] => Array ( [0] => Could not insert post into the database ) ) [error_data] => Array ( [db_insert_error] => ERROR: duplicate key value violates unique constraint "mood_posts_pkey" DETAIL: Key ("ID")=(39) already exists. ) )

    I have clean wordpress install with imported old posts (tool > import), and I don’t specify any id on insert.
    Postgres 9.1

    https://www.ads-software.com/extend/plugins/postgresql-for-wordpress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter velocityzen

    (@velocityzen)

    I’m trying to insert data again and post ID in error message is incrementing
    Key ("ID")=(59) already exists.

    Thread Starter velocityzen

    (@velocityzen)

    I’m figure out that posts_seq has not updated it value after wp-import. Maybe it’s wp-import’s bug. I fixed it through pgphpadmin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: PostgreSQL for WordPress (PG4WP)] Error on wp_insert_post’ is closed to new replies.