Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 33689dc

Browse files
committed
make scan-build happy once again
1 parent 96c3947 commit 33689dc

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/partition_filter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ find_partition_for_value(Datum value, Oid value_type,
383383
#define CopyToTempConst(const_field, attr_field) \
384384
( temp_const.const_field = prel->attr_field )
385385

386-
Oid result;
386+
Oid result = InvalidOid;
387387
Const temp_const; /* temporary const for expr walker */
388388
WalkerContext wcxt;
389389
List *ranges = NIL;

src/pl_funcs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,9 +531,9 @@ tuple_format_is_convertable(PG_FUNCTION_ARGS)
531531
PG_TRY();
532532
{
533533
/* Try to build a conversion map */
534-
(void) convert_tuples_by_name_map(rel1->rd_att,
535-
rel2->rd_att,
536-
"doesn't matter");
534+
(void) convert_tuples_by_name(rel1->rd_att,
535+
rel2->rd_att,
536+
"doesn't matter");
537537
}
538538
PG_CATCH();
539539
{

src/ref_integrity.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,6 @@ create_foreign_key_internal(Oid fk_table,
13401340
fk_table,
13411341
&fk_attnum,
13421342
1,
1343-
1,
13441343
InvalidOid, /* not a domain
13451344
* constraint */
13461345
indexOid,
@@ -1729,8 +1728,12 @@ get_index_for_key(Relation rel, AttrNumber attnum, Oid *index_id)
17291728
* Must have the right number of columns; must be unique and not a
17301729
* partial index; forget it if there are any expressions, too. Invalid
17311730
* indexes are out as well.
1731+
*
1732+
* TODO: in postgres 10 there is indnkeyatts attribute we must check
1733+
* instead of indnatts. We should keep this in mind when we adapt
1734+
* to the newer version.
17321735
*/
1733-
if (indexStruct->indnkeyatts == 1 &&
1736+
if (indexStruct->indnatts == 1 &&
17341737
indexStruct->indisunique &&
17351738
IndexIsValid(indexStruct) &&
17361739
heap_attisnull(indexTuple, Anum_pg_index_indpred) &&

0 commit comments

Comments
 (0)