Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
65019fcf
Commit
65019fcf
authored
May 19, 1997
by
Vadim B. Mikheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Multi-column indices creation is now supported in normal way
(CREATE INDEX ...)
parent
6ea80b47
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
185 deletions
+0
-185
contrib/multikey/Makefile
contrib/multikey/Makefile
+0
-29
contrib/multikey/create.sql
contrib/multikey/create.sql
+0
-15
contrib/multikey/multikey.c
contrib/multikey/multikey.c
+0
-141
No files found.
contrib/multikey/Makefile
deleted
100644 → 0
View file @
6ea80b47
POSTSRC
=
/home/postgres/postgres95/src
include
$(POSTSRC)/Makefile.global
include
$(POSTSRC)/Makefile.custom
CFLAGS
=
$(CFLAGS_SL)
-Wall
-Wmissing-prototypes
-I
$(POSTSRC)
/include
%.so
:
%.o
$(LD)
-x
-r
-o
$<
.obj
$<
@
echo
building shared object
$@
@
rm
-f
$@
.pic
@
${AR}
cq
$@
.pic
`
lorder
$<
.obj |
tsort
`
${RANLIB}
$@
.pic
@
rm
-f
$@
$(LD)
-x
-Bshareable
-Bforcearchive
\
-o
$@
$@
.pic
#
# build dynamically-loaded object file
#
DLOBJS
=
multikey.so
objdir
=
./
CLEANFILES
+=
$(DLOBJS)
all
::
$(DLOBJS)
$(DLOBJS)
:
multikey.c
contrib/multikey/create.sql
deleted
100644 → 0
View file @
6ea80b47
drop
function
create_mki_2
(
text
,
text
,
text
,
text
);
drop
function
create_mki_3
(
text
,
text
,
text
,
text
,
text
);
drop
function
create_mki_4
(
text
,
text
,
text
,
text
,
text
,
text
);
create
function
create_mki_2
(
text
,
text
,
text
,
text
)
returns
int4
as
'/home/postgres/My/Btree/MULTIKEY/multikey.so'
language
'c'
;
create
function
create_mki_3
(
text
,
text
,
text
,
text
,
text
)
returns
int4
as
'/home/postgres/My/Btree/MULTIKEY/multikey.so'
language
'c'
;
create
function
create_mki_4
(
text
,
text
,
text
,
text
,
text
,
text
)
returns
int4
as
'/home/postgres/My/Btree/MULTIKEY/multikey.so'
language
'c'
;
contrib/multikey/multikey.c
deleted
100644 → 0
View file @
6ea80b47
/*-------------------------------------------------------------------------
*
* multikey.c--
* POSTGRES multikey indices create code.
*
*-------------------------------------------------------------------------
*/
#include <stdio.h>
#include <string.h>
#include <postgres.h>
#include <storage/lmgr.h>
#include <nodes/parsenodes.h>
#include <commands/defrem.h>
#include <utils/builtins.h>
int4
create_mki_2
(
struct
varlena
*
index
,
struct
varlena
*
rel
,
struct
varlena
*
a1
,
struct
varlena
*
a2
);
int4
create_mki_3
(
struct
varlena
*
index
,
struct
varlena
*
rel
,
struct
varlena
*
a1
,
struct
varlena
*
a2
,
struct
varlena
*
a3
);
int4
create_mki_4
(
struct
varlena
*
index
,
struct
varlena
*
rel
,
struct
varlena
*
a1
,
struct
varlena
*
a2
,
struct
varlena
*
a3
,
struct
varlena
*
a4
);
extern
bool
FastBuild
;
static
bool
BuildMode
;
int4
create_mki_2
(
struct
varlena
*
index
,
struct
varlena
*
rel
,
struct
varlena
*
a1
,
struct
varlena
*
a2
)
{
char
*
indexname
=
textout
(
index
);
char
*
relname
=
textout
(
rel
);
char
*
a1name
=
textout
(
a1
);
char
*
a2name
=
textout
(
a2
);
IndexElem
*
ie1
=
makeNode
(
IndexElem
);
IndexElem
*
ie2
=
makeNode
(
IndexElem
);
List
*
alist
;
ie1
->
name
=
a1name
;
ie1
->
args
=
NIL
;
ie1
->
class
=
NULL
;
ie1
->
tname
=
(
TypeName
*
)
NULL
;
ie2
->
name
=
a2name
;
ie2
->
args
=
NIL
;
ie2
->
class
=
NULL
;
ie2
->
tname
=
(
TypeName
*
)
NULL
;
alist
=
lcons
(
ie2
,
NIL
);
alist
=
lcons
(
ie1
,
alist
);
BuildMode
=
FastBuild
;
FastBuild
=
false
;
/* for the moment */
DefineIndex
(
relname
,
indexname
,
"btree"
,
alist
,
(
List
*
)
NULL
,
false
,
(
Expr
*
)
NULL
,
(
List
*
)
NULL
);
FastBuild
=
BuildMode
;
return
(
0
);
}
int4
create_mki_3
(
struct
varlena
*
index
,
struct
varlena
*
rel
,
struct
varlena
*
a1
,
struct
varlena
*
a2
,
struct
varlena
*
a3
)
{
char
*
indexname
=
textout
(
index
);
char
*
relname
=
textout
(
rel
);
char
*
a1name
=
textout
(
a1
);
char
*
a2name
=
textout
(
a2
);
char
*
a3name
=
textout
(
a3
);
IndexElem
*
ie1
=
makeNode
(
IndexElem
);
IndexElem
*
ie2
=
makeNode
(
IndexElem
);
IndexElem
*
ie3
=
makeNode
(
IndexElem
);
List
*
alist
;
ie1
->
name
=
a1name
;
ie1
->
args
=
NIL
;
ie1
->
class
=
NULL
;
ie1
->
tname
=
(
TypeName
*
)
NULL
;
ie2
->
name
=
a2name
;
ie2
->
args
=
NIL
;
ie2
->
class
=
NULL
;
ie2
->
tname
=
(
TypeName
*
)
NULL
;
ie3
->
name
=
a3name
;
ie3
->
args
=
NIL
;
ie3
->
class
=
NULL
;
ie3
->
tname
=
(
TypeName
*
)
NULL
;
alist
=
lcons
(
ie3
,
NIL
);
alist
=
lcons
(
ie2
,
alist
);
alist
=
lcons
(
ie1
,
alist
);
BuildMode
=
FastBuild
;
FastBuild
=
false
;
/* for the moment */
DefineIndex
(
relname
,
indexname
,
"btree"
,
alist
,
(
List
*
)
NULL
,
false
,
(
Expr
*
)
NULL
,
(
List
*
)
NULL
);
FastBuild
=
BuildMode
;
return
(
0
);
}
int4
create_mki_4
(
struct
varlena
*
index
,
struct
varlena
*
rel
,
struct
varlena
*
a1
,
struct
varlena
*
a2
,
struct
varlena
*
a3
,
struct
varlena
*
a4
)
{
char
*
indexname
=
textout
(
index
);
char
*
relname
=
textout
(
rel
);
char
*
a1name
=
textout
(
a1
);
char
*
a2name
=
textout
(
a2
);
char
*
a3name
=
textout
(
a3
);
char
*
a4name
=
textout
(
a4
);
IndexElem
*
ie1
=
makeNode
(
IndexElem
);
IndexElem
*
ie2
=
makeNode
(
IndexElem
);
IndexElem
*
ie3
=
makeNode
(
IndexElem
);
IndexElem
*
ie4
=
makeNode
(
IndexElem
);
List
*
alist
;
ie1
->
name
=
a1name
;
ie1
->
args
=
NIL
;
ie1
->
class
=
NULL
;
ie1
->
tname
=
(
TypeName
*
)
NULL
;
ie2
->
name
=
a2name
;
ie2
->
args
=
NIL
;
ie2
->
class
=
NULL
;
ie2
->
tname
=
(
TypeName
*
)
NULL
;
ie3
->
name
=
a3name
;
ie3
->
args
=
NIL
;
ie3
->
class
=
NULL
;
ie3
->
tname
=
(
TypeName
*
)
NULL
;
ie4
->
name
=
a4name
;
ie4
->
args
=
NIL
;
ie4
->
class
=
NULL
;
ie4
->
tname
=
(
TypeName
*
)
NULL
;
alist
=
lcons
(
ie4
,
NIL
);
alist
=
lcons
(
ie3
,
alist
);
alist
=
lcons
(
ie2
,
alist
);
alist
=
lcons
(
ie1
,
alist
);
BuildMode
=
FastBuild
;
FastBuild
=
false
;
/* for the moment */
DefineIndex
(
relname
,
indexname
,
"btree"
,
alist
,
(
List
*
)
NULL
,
false
,
(
Expr
*
)
NULL
,
(
List
*
)
NULL
);
FastBuild
=
BuildMode
;
return
(
0
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment