Describe packet

A Describe packet is sent by the client to ask the database for the description of a prepared statement or portal/cursor. If all goes well, the database servers responds with a RowDescription packet describing the result set that will be returned by the specified prepared statement or portal/cursor.

The packet object has the following methods:

  • char getDescribeType() : returns 'S' for prepared statement or 'P' for portal/cursor.

  • void setDescribeType(char c) : sets the type for the describe command, must be either 'S' or 'P'.

  • String getDescribeName() : gets the name of the object to describe. This can returns an empty string for the default prepared statement or portal/cursor.

  • void setDescribeName(String newName) : sets the name of the object to describe.