Commits

Tuukka Norri  committed 2b269e0

UPDATE optimization and fixes
- Changed UPDATE queries so that an additional SELECT will be performed only if the primary key changes and a predicate has been given instead of an object ID.
- Changed query sending so that only the number of parameters the user has given will be passed to the database.
- Moved DROP SCHEMA to the beginning of the transaction in BaseTenModifications.sql.

  • Participants
  • Parent commits 03f57da
  • Branches PGTS

Comments (0)

Files changed (1)

File Framework/Sources/PGTSConnectionQueries.m

    messageDelegate: (BOOL) messageDelegate
 {
     int rval = 0;
-    int nParams = [parameters count];
+    int nParams = MIN ([parameters count], [queryString PGTSParameterCount]);
     const char** paramValues  = calloc (nParams, sizeof (char *));
     Oid*   paramTypes   = calloc (nParams, sizeof (Oid));
     int*   paramLengths = calloc (nParams, sizeof (int));