An SQL dialect for PostgreSQL 8.1 and above.

Namespace: NHibernate.Dialect
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
public class PostgreSQL81Dialect : PostgreSQLDialect
Visual Basic
Public Class PostgreSQL81Dialect _
	Inherits PostgreSQLDialect
Visual C++
public ref class PostgreSQL81Dialect : public PostgreSQLDialect

Remarks

PostgreSQL 8.1 supports FOR UPDATE ... NOWAIT syntax.

PostgreSQL supports Identity column using the "SERIAL" type. Serial type is a "virtual" type that will automatically:

  • Create a sequence named tablename_colname_seq.
  • Set the default value of this column to the next value of the sequence. (using function nextval('tablename_colname_seq'))
  • Add a "NOT NULL" constraint to this column.
  • Set the sequence as "owned by" the table.

To insert the next value of the sequence into the serial column, exclude the column from the list of columns in the INSERT statement or use the DEFAULT key word.

If the table or the column is dropped, the sequence is dropped too.

Inheritance Hierarchy

See Also