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
1e15f9e1
Commit
1e15f9e1
authored
Jan 08, 2002
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed array pointers, no longer using void * in arithmetics.
parent
055d4f92
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
13 deletions
+17
-13
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+4
-0
src/interfaces/ecpg/lib/data.c
src/interfaces/ecpg/lib/data.c
+2
-2
src/interfaces/ecpg/lib/execute.c
src/interfaces/ecpg/lib/execute.c
+9
-9
src/interfaces/ecpg/lib/extern.h
src/interfaces/ecpg/lib/extern.h
+1
-1
src/interfaces/ecpg/preproc/type.c
src/interfaces/ecpg/preproc/type.c
+1
-1
No files found.
src/interfaces/ecpg/ChangeLog
View file @
1e15f9e1
...
...
@@ -1188,5 +1188,9 @@ Sun Dec 23 13:08:36 CET 2001
Mon Jan 7 12:18:01 CET 2002
- Fixed parser to accept initializing expressions starting with "(".
Tue Jan 8 15:16:37 CET 2002
- Fixed array pointers, no longer using void *.
- Set ecpg version to 2.9.0.
- Set library version to 3.3.0.
src/interfaces/ecpg/lib/data.c
View file @
1e15f9e1
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/data.c,v 1.2
1 2001/12/23 12:17:41
meskes Exp $ */
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/data.c,v 1.2
2 2002/01/08 14:25:04
meskes Exp $ */
#include "postgres_fe.h"
...
...
@@ -14,7 +14,7 @@
bool
ECPGget_data
(
const
PGresult
*
results
,
int
act_tuple
,
int
act_field
,
int
lineno
,
enum
ECPGttype
type
,
enum
ECPGttype
ind_type
,
void
*
var
,
void
*
ind
,
long
varcharsize
,
long
offset
,
char
*
var
,
char
*
ind
,
long
varcharsize
,
long
offset
,
long
ind_offset
,
bool
isarray
)
{
char
*
pval
=
(
char
*
)
PQgetvalue
(
results
,
act_tuple
,
act_field
);
...
...
src/interfaces/ecpg/lib/execute.c
View file @
1e15f9e1
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.3
4 2001/12/23 12:17:41
meskes Exp $ */
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.3
5 2002/01/08 14:25:04
meskes Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
...
...
@@ -142,7 +142,7 @@ create_statement(int lineno, struct connection * connection, struct statement **
return
false
;
var
->
type
=
type
;
var
->
pointer
=
va_arg
(
ap
,
void
*
);
var
->
pointer
=
va_arg
(
ap
,
char
*
);
/* if variable is NULL, the statement hasn't been prepared */
if
(
var
->
pointer
==
NULL
)
...
...
@@ -157,12 +157,12 @@ create_statement(int lineno, struct connection * connection, struct statement **
var
->
offset
=
va_arg
(
ap
,
long
);
if
(
var
->
arrsize
==
0
||
var
->
varcharsize
==
0
)
var
->
value
=
*
((
void
**
)
(
var
->
pointer
));
var
->
value
=
*
((
char
**
)
(
var
->
pointer
));
else
var
->
value
=
var
->
pointer
;
var
->
ind_type
=
va_arg
(
ap
,
enum
ECPGttype
);
var
->
ind_pointer
=
va_arg
(
ap
,
void
*
);
var
->
ind_pointer
=
va_arg
(
ap
,
char
*
);
var
->
ind_varcharsize
=
va_arg
(
ap
,
long
);
var
->
ind_arrsize
=
va_arg
(
ap
,
long
);
var
->
ind_offset
=
va_arg
(
ap
,
long
);
...
...
@@ -170,7 +170,7 @@ create_statement(int lineno, struct connection * connection, struct statement **
if
(
var
->
ind_type
!=
ECPGt_NO_INDICATOR
&&
(
var
->
ind_arrsize
==
0
||
var
->
ind_varcharsize
==
0
))
var
->
ind_value
=
*
((
void
**
)
(
var
->
ind_pointer
));
var
->
ind_value
=
*
((
char
**
)
(
var
->
ind_pointer
));
else
var
->
ind_value
=
var
->
ind_pointer
;
...
...
@@ -422,8 +422,8 @@ ECPGstore_result(const PGresult *results, int act_field,
len
=
var
->
offset
*
ntuples
;
break
;
}
var
->
value
=
(
void
*
)
ECPGalloc
(
len
,
stmt
->
lineno
);
*
((
void
**
)
var
->
pointer
)
=
var
->
value
;
var
->
value
=
(
char
*
)
ECPGalloc
(
len
,
stmt
->
lineno
);
*
((
char
**
)
var
->
pointer
)
=
var
->
value
;
ECPGadd_mem
(
var
->
value
,
stmt
->
lineno
);
}
...
...
@@ -431,8 +431,8 @@ ECPGstore_result(const PGresult *results, int act_field,
if
((
var
->
ind_arrsize
==
0
||
var
->
ind_varcharsize
==
0
)
&&
var
->
ind_value
==
NULL
&&
var
->
ind_pointer
!=
NULL
)
{
int
len
=
var
->
ind_offset
*
ntuples
;
var
->
ind_value
=
(
void
*
)
ECPGalloc
(
len
,
stmt
->
lineno
);
*
((
void
**
)
var
->
ind_pointer
)
=
var
->
ind_value
;
var
->
ind_value
=
(
char
*
)
ECPGalloc
(
len
,
stmt
->
lineno
);
*
((
char
**
)
var
->
ind_pointer
)
=
var
->
ind_value
;
ECPGadd_mem
(
var
->
ind_value
,
stmt
->
lineno
);
}
...
...
src/interfaces/ecpg/lib/extern.h
View file @
1e15f9e1
...
...
@@ -6,7 +6,7 @@
void
ECPGadd_mem
(
void
*
ptr
,
int
lineno
);
bool
ECPGget_data
(
const
PGresult
*
,
int
,
int
,
int
,
enum
ECPGttype
type
,
enum
ECPGttype
,
void
*
,
void
*
,
long
,
long
,
long
,
bool
);
enum
ECPGttype
,
char
*
,
char
*
,
long
,
long
,
long
,
bool
);
struct
connection
*
ECPGget_connection
(
const
char
*
);
void
ECPGinit_sqlca
(
void
);
char
*
ECPGalloc
(
long
,
int
);
...
...
src/interfaces/ecpg/preproc/type.c
View file @
1e15f9e1
...
...
@@ -183,7 +183,7 @@ get_type(enum ECPGttype type)
/* Dump a type.
The type is dumped as:
type-tag <comma> - enum ECPGttype
reference-to-variable <comma>
- void
*
reference-to-variable <comma>
- char
*
size <comma> - long size of this field (if varchar)
arrsize <comma> - long number of elements in the arr
offset <comma> - offset to the next element
...
...
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