diff options
author | Marc G. Fournier <scrappy@hub.org> | 1997-03-12 21:13:19 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 1997-03-12 21:13:19 +0000 |
commit | 5dde558ce60db1f8747bbf745d56bd9cd5f4c7b7 (patch) | |
tree | 046cc029a35d6e30af46ea08f8eae259eb739a8d /src/backend/optimizer | |
parent | b66569e41fdecab3903fd8af6cbc8bb12ae653cd (diff) |
From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] linux/alpha patches
These patches lay the groundwork for a Linux/Alpha port. The port doesn't
actually work unless you tweak the linker to put all the pointers in the
first 32 bits of the address space, but it's at least a start. It
implements the test-and-set instruction in Alpha assembly, and also fixes
a lot of pointer-to-integer conversions, which is probably good anyway.
Diffstat (limited to 'src/backend/optimizer')
-rw-r--r-- | src/backend/optimizer/plan/createplan.c | 8 | ||||
-rw-r--r-- | src/backend/optimizer/plan/initsplan.c | 6 | ||||
-rw-r--r-- | src/backend/optimizer/util/plancat.c | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 7d131d7371b..463cc2448e3 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.7 1997/01/10 20:17:56 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.8 1997/03/12 21:05:56 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -292,7 +292,7 @@ create_seqscan_node(Path *best_path, List *tlist, List *scan_clauses) if(temp == NULL) elog(WARN,"scanrelid is empty"); else - scan_relid = (Index)lfirst(temp); /* ??? who takes care of lnext? - ay */ + scan_relid = (Index)lfirsti(temp); /* ??? who takes care of lnext? - ay */ scan_node = make_seqscan(tlist, scan_clauses, scan_relid, @@ -640,10 +640,10 @@ fix_indxqual_references(Node *clause, Path *index_path) is_funcclause((Node*)get_leftop((Expr*)clause)) && ((Func*)((Expr*)get_leftop((Expr*)clause))->oper)->funcisindex){ Var *newvar = - makeVar((Index)lfirst(index_path->parent->relids), + makeVar((Index)lfirsti(index_path->parent->relids), 1, /* func indices have one key */ ((Func*)((Expr*)clause)->oper)->functype, - (Index)lfirst(index_path->parent->relids), + (Index)lfirsti(index_path->parent->relids), 0); return diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c index f7ec544eee2..cec015bb01c 100644 --- a/src/backend/optimizer/plan/initsplan.c +++ b/src/backend/optimizer/plan/initsplan.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.3 1997/02/20 02:53:26 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.4 1997/03/12 21:05:59 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -256,8 +256,8 @@ add_join_clause_info_to_rels(Query *root, CInfo *clauseinfo, List *join_relids) foreach (rel, join_relids) { - if ( (int)lfirst(rel) != (int)lfirst(join_relid) ) - other_rels = lappendi (other_rels, lfirst(rel)); + if ( lfirsti(rel) != lfirsti(join_relid) ) + other_rels = lappendi (other_rels, lfirsti(rel)); } joininfo = diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index 371b121a0f1..7a108578ed1 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.3 1996/11/06 09:29:24 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.4 1997/03/12 21:06:14 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -267,12 +267,12 @@ index_selectivity(Oid indid, i = 0; foreach(xopno, opnos) { - opno_array[i++] = (int)lfirst(xopno); + opno_array[i++] = lfirsti(xopno); } i = 0; foreach(xattno,attnos) { - attno_array[i++] = (int)lfirst(xattno); + attno_array[i++] = lfirsti(xattno); } i = 0; @@ -282,7 +282,7 @@ index_selectivity(Oid indid, i = 0; foreach(flag,flags) { - flag_array[i++] = (int)lfirst(flag); + flag_array[i++] = lfirsti(flag); } IndexSelectivity(indid, |