PostgreSQL for WordPress (PG4WP)
[resolved] Error on wp_insert_post (3 posts)

  1. velocityzen
    Posted 3 years ago #

    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


  2. velocityzen
    Posted 3 years ago #

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

  3. velocityzen
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • PostgreSQL for WordPress (PG4WP)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic