1111 */
1212
1313/**
14- * The name by which to obtain a lock for retrive the next insert id.
14+ * The name by which to obtain a lock for retrieving the next insert id.
1515 */
1616define ('POSTGRESQL_NEXTID_LOCK ' , 1000 );
1717
@@ -55,7 +55,7 @@ class DatabaseConnection_pgsql extends DatabaseConnection {
5555 $ connection_options ['pdo ' ] += array (
5656 // Prepared statements are most effective for performance when queries
5757 // are recycled (used several times). However, if they are not re-used,
58- // prepared statements become ineffecient . Since most of Drupal's
58+ // prepared statements become inefficient . Since most of Drupal's
5959 // prepared queries are not re-used, it should be faster to emulate
6060 // the preparation than to actually ready statements for re-use. If in
6161 // doubt, reset to FALSE and measure performance.
@@ -175,14 +175,14 @@ class DatabaseConnection_pgsql extends DatabaseConnection {
175175 }
176176
177177 /**
178- * Retrive a the next id in a sequence.
178+ * Retrieve the next id in a sequence.
179179 *
180180 * PostgreSQL has built in sequences. We'll use these instead of inserting
181181 * and updating a sequences table.
182182 */
183183 public function nextId ($ existing = 0 ) {
184184
185- // Retrive the name of the sequence. This information cannot be cached
185+ // Retrieve the name of the sequence. This information cannot be cached
186186 // because the prefix may change, for example, like it does in simpletests.
187187 $ sequence_name = $ this ->makeSequenceName ('sequences ' , 'value ' );
188188
@@ -194,7 +194,7 @@ class DatabaseConnection_pgsql extends DatabaseConnection {
194194 }
195195
196196 // PostgreSQL advisory locks are simply locks to be used by an
197- // application such as Drupal. This will prevent other Drupal proccesses
197+ // application such as Drupal. This will prevent other Drupal processes
198198 // from altering the sequence while we are.
199199 $ this ->query ("SELECT pg_advisory_lock( " . POSTGRESQL_NEXTID_LOCK . ") " );
200200
@@ -209,7 +209,7 @@ class DatabaseConnection_pgsql extends DatabaseConnection {
209209 // Reset the sequence to a higher value than the existing id.
210210 $ this ->query ("ALTER SEQUENCE " . $ sequence_name . " RESTART WITH " . ($ existing + 1 ));
211211
212- // Retrive the next id. We know this will be as high as we want it.
212+ // Retrieve the next id. We know this will be as high as we want it.
213213 $ id = $ this ->query ("SELECT nextval(' " . $ sequence_name . "') " )->fetchField ();
214214
215215 $ this ->query ("SELECT pg_advisory_unlock( " . POSTGRESQL_NEXTID_LOCK . ") " );
0 commit comments