diff --git a/jOOQ/src/main/java/org/jooq/DSLContext.java b/jOOQ/src/main/java/org/jooq/DSLContext.java index 88b85759ce..98f8c27b5f 100644 --- a/jOOQ/src/main/java/org/jooq/DSLContext.java +++ b/jOOQ/src/main/java/org/jooq/DSLContext.java @@ -5181,20 +5181,30 @@ public interface DSLContext extends Scope { /** * Retrieve the last inserted ID. *
- * Note, there are some restrictions to the following dialects: + * This is implemented for the following dialects: *
@@identity@@identitylast_insert_id()identity_val_local()identity()identity()dbinfo('sqlca.sqlerrd1')last_identity()last_insert_id()last_insert_id()lastval()last_insert_rowid()@@identity@@identitynull in some
* dialects, if no such number is available.
* @throws DataAccessException if something went wrong executing the query
*/
- @Support({ CUBRID, DERBY, H2, HSQLDB, MARIADB, MYSQL, SQLITE })
+ @Support({ CUBRID, DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
BigInteger lastID() throws DataAccessException;
/**
diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java b/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java
index 869f8317c0..17f767df1f 100644
--- a/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java
+++ b/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java
@@ -1778,6 +1778,11 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return select(field).fetchOne(field);
}
+ case POSTGRES: {
+ Field