3
3
* procedural language
4
4
*
5
5
* IDENTIFICATION
6
- * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.96 2005/11/22 18: 17:33 momjian Exp $
6
+ * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.97 2005/12/09 17:08:49 tgl Exp $
7
7
*
8
8
* This software is copyrighted by Jan Wieck - Hamburg.
9
9
*
@@ -1316,25 +1316,25 @@ plpgsql_parse_dblwordtype(char *word)
1316
1316
0 , 0 , 0 );
1317
1317
if (!HeapTupleIsValid (classtup ))
1318
1318
goto done ;
1319
+ classStruct = (Form_pg_class ) GETSTRUCT (classtup );
1319
1320
1320
1321
/*
1321
1322
* It must be a relation, sequence, view, or type
1322
1323
*/
1323
- classStruct = (Form_pg_class ) GETSTRUCT (classtup );
1324
1324
if (classStruct -> relkind != RELKIND_RELATION &&
1325
1325
classStruct -> relkind != RELKIND_SEQUENCE &&
1326
1326
classStruct -> relkind != RELKIND_VIEW &&
1327
1327
classStruct -> relkind != RELKIND_COMPOSITE_TYPE )
1328
1328
goto done ;
1329
1329
1330
1330
/*
1331
- * Fetch the named table field and it's type
1331
+ * Fetch the named table field and its type
1332
1332
*/
1333
1333
attrtup = SearchSysCacheAttName (classOid , cp [1 ]);
1334
1334
if (!HeapTupleIsValid (attrtup ))
1335
1335
goto done ;
1336
-
1337
1336
attrStruct = (Form_pg_attribute ) GETSTRUCT (attrtup );
1337
+
1338
1338
typetup = SearchSysCache (TYPEOID ,
1339
1339
ObjectIdGetDatum (attrStruct -> atttypid ),
1340
1340
0 , 0 , 0 );
@@ -1373,10 +1373,10 @@ plpgsql_parse_tripwordtype(char *word)
1373
1373
{
1374
1374
Oid classOid ;
1375
1375
HeapTuple classtup = NULL ;
1376
- Form_pg_class classStruct ;
1377
1376
HeapTuple attrtup = NULL ;
1378
- Form_pg_attribute attrStruct ;
1379
1377
HeapTuple typetup = NULL ;
1378
+ Form_pg_class classStruct ;
1379
+ Form_pg_attribute attrStruct ;
1380
1380
char * cp [2 ];
1381
1381
char * colname [1 ];
1382
1382
int qualified_att_len ;
@@ -1421,26 +1421,26 @@ plpgsql_parse_tripwordtype(char *word)
1421
1421
0 , 0 , 0 );
1422
1422
if (!HeapTupleIsValid (classtup ))
1423
1423
goto done ;
1424
+ classStruct = (Form_pg_class ) GETSTRUCT (classtup );
1424
1425
1425
1426
/*
1426
1427
* It must be a relation, sequence, view, or type
1427
1428
*/
1428
- classStruct = (Form_pg_class ) GETSTRUCT (classtup );
1429
1429
if (classStruct -> relkind != RELKIND_RELATION &&
1430
1430
classStruct -> relkind != RELKIND_SEQUENCE &&
1431
1431
classStruct -> relkind != RELKIND_VIEW &&
1432
1432
classStruct -> relkind != RELKIND_COMPOSITE_TYPE )
1433
1433
goto done ;
1434
1434
1435
1435
/*
1436
- * Fetch the named table field and it's type
1436
+ * Fetch the named table field and its type
1437
1437
*/
1438
1438
plpgsql_convert_ident (cp [1 ], colname , 1 );
1439
1439
attrtup = SearchSysCacheAttName (classOid , colname [0 ]);
1440
1440
if (!HeapTupleIsValid (attrtup ))
1441
1441
goto done ;
1442
-
1443
1442
attrStruct = (Form_pg_attribute ) GETSTRUCT (attrtup );
1443
+
1444
1444
typetup = SearchSysCache (TYPEOID ,
1445
1445
ObjectIdGetDatum (attrStruct -> atttypid ),
1446
1446
0 , 0 , 0 );
@@ -1459,7 +1459,7 @@ plpgsql_parse_tripwordtype(char *word)
1459
1459
done :
1460
1460
if (HeapTupleIsValid (classtup ))
1461
1461
ReleaseSysCache (classtup );
1462
- if (HeapTupleIsValid (classtup ))
1462
+ if (HeapTupleIsValid (attrtup ))
1463
1463
ReleaseSysCache (attrtup );
1464
1464
if (HeapTupleIsValid (typetup ))
1465
1465
ReleaseSysCache (typetup );
0 commit comments