Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2009
    Posts
    3

    Unanswered: Java Persistence and Postgresql Enum Produces Type Error

    Selecting Pg Enum values is no problem. However, inserting a String produces: "ERROR: column "pg_enum" is of type pg_enum_type but expression is of type character varying". Java EnumType Ordinal produces a similar error.

    Anyone know of a solution besides dropping Java Persistence altogether?

    Context: Java 6, Postgresql 8.3, JDBC 3 driver.

  2. #2
    Join Date
    Aug 2009
    Location
    Olympia, WA
    Posts
    337
    My guess is that you have an older version of the JDBC driver. Enums weren't supported until 8.3 so maybe your JDBC version predates that. Also the JDBC website recommends using JDBC 4 with Java 1.6.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •