## For PostgreSQL

The following limitations apply to PostgreSQL databases accessed via Libgda:

### BLOB handling

- Postgres uses the "Oid" data type to internally store BLOBs, but this type is also used to store other information within the database. Libgda assumes that any column of type "Oid" represents a blob. If this is not the case, then you must cast it to the correct data type within your SQL query (for example as "SELECT oid::varchar FROM...")

- As Libgda tries as much as possible to avoid orphaned BLOBs, it assumes that any BLOB Oid is present in at most one column of a table (and if not present, then the BLOB is orphaned); if a same BLOB is present in more than one column of a table, then expect some problems.

- BLOB manipulations can only occur within a transaction, so you should start a transaction before any operation on BLOBs, otherwise Libgda will automatically start one

### gda_server_provider_get_last_insert_id()

The gda_server_provider_get_last_insert_id() function returns the Oid of the last inserted row, of the last INSERT command (or execute of a INSERT query) that inserted exactly one row into a table that has OIDs. Otherwise, this function returns NULL. This function will also return NULL if the table affected by the INSERT statement does not contain OIDs.