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
2720c570
Commit
2720c570
authored
Sep 03, 2009
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed some variables no longer needed.
parent
fe35c8e1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
32 deletions
+18
-32
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+4
-0
src/interfaces/ecpg/compatlib/informix.c
src/interfaces/ecpg/compatlib/informix.c
+3
-7
src/interfaces/ecpg/pgtypeslib/interval.c
src/interfaces/ecpg/pgtypeslib/interval.c
+2
-2
src/interfaces/ecpg/pgtypeslib/numeric.c
src/interfaces/ecpg/pgtypeslib/numeric.c
+3
-5
src/interfaces/ecpg/pgtypeslib/timestamp.c
src/interfaces/ecpg/pgtypeslib/timestamp.c
+1
-3
src/interfaces/ecpg/preproc/type.c
src/interfaces/ecpg/preproc/type.c
+5
-15
No files found.
src/interfaces/ecpg/ChangeLog
View file @
2720c570
...
...
@@ -2424,6 +2424,10 @@ Fri, 14 Aug 2009 14:45:02 +0200
- Made sure sqlca is reset for declare cursor in Informix mode as
pointed out by Böszörményi Zoltán <zb@cybertec.at>.
Thu, 03 Sep 2009 11:45:13 +0200
- Removed some no longer used variables as reported by clang.
- Set ecpg library version to 6.2.
- Set compat library version to 3.2.
- Set ecpg version to 4.6.
src/interfaces/ecpg/compatlib/informix.c
View file @
2720c570
/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.6
0 2009/08/14 13:28:22
meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.6
1 2009/09/03 09:59:20
meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
...
...
@@ -767,13 +767,12 @@ rfmtlong(long lng_val, char *fmt, char *outbuf)
size_t
fmt_len
=
strlen
(
fmt
);
size_t
temp_len
;
int
i
,
j
,
j
,
/* position in temp */
k
,
dotpos
;
int
leftalign
=
0
,
blank
=
0
,
sign
=
0
,
entity
=
0
,
entitydone
=
0
,
signdone
=
0
,
brackets_ok
=
0
;
...
...
@@ -811,7 +810,6 @@ rfmtlong(long lng_val, char *fmt, char *outbuf)
/* start to parse the formatstring */
temp
[
0
]
=
'\0'
;
j
=
0
;
/* position in temp */
k
=
value
.
digits
-
1
;
/* position in the value_string */
for
(
i
=
fmt_len
-
1
,
j
=
0
;
i
>=
0
;
i
--
,
j
++
)
{
...
...
@@ -819,9 +817,7 @@ rfmtlong(long lng_val, char *fmt, char *outbuf)
if
(
k
<
0
)
{
blank
=
1
;
if
(
k
==
-
2
)
entity
=
1
;
else
if
(
k
==
-
1
)
if
(
k
==
-
1
)
sign
=
1
;
if
(
leftalign
)
{
...
...
src/interfaces/ecpg/pgtypeslib/interval.c
View file @
2720c570
/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/interval.c,v 1.4
1 2009/06/11 14:49:13 momjian
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/interval.c,v 1.4
2 2009/09/03 09:59:20 meskes
Exp $ */
#include "postgres_fe.h"
#include <time.h>
...
...
@@ -918,7 +918,7 @@ EncodeInterval(struct /* pg_ */ tm * tm, fsec_t fsec, int style, char *str)
AppendSeconds
(
cp
,
sec
,
fsec
,
MAX_INTERVAL_PRECISION
,
false
);
cp
+=
strlen
(
cp
);
*
cp
++
=
'S'
;
*
cp
++
=
'\0'
;
*
cp
=
'\0'
;
}
break
;
...
...
src/interfaces/ecpg/pgtypeslib/numeric.c
View file @
2720c570
/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/numeric.c,v 1.3
3 2006/10/04 00:30:12 momjian
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/numeric.c,v 1.3
4 2009/09/03 09:59:20 meskes
Exp $ */
#include "postgres_fe.h"
#include <ctype.h>
...
...
@@ -1046,7 +1046,6 @@ select_div_scale(numeric *var1, numeric *var2, int *rscale)
NumericDigit
firstdigit1
,
firstdigit2
;
int
res_dscale
;
int
res_rscale
;
/*
* The result scale of a division isn't specified in any SQL standard. For
...
...
@@ -1098,7 +1097,7 @@ select_div_scale(numeric *var1, numeric *var2, int *rscale)
res_dscale
=
Min
(
res_dscale
,
NUMERIC_MAX_DISPLAY_SCALE
);
/* Select result scale */
*
rscale
=
res_
rscale
=
res_
dscale
+
4
;
*
rscale
=
res_dscale
+
4
;
return
res_dscale
;
}
...
...
@@ -1537,9 +1536,8 @@ int
PGTYPESnumeric_to_double
(
numeric
*
nv
,
double
*
dp
)
{
double
tmp
;
int
i
;
if
(
(
i
=
numericvar_to_double
(
nv
,
&
tmp
)
)
!=
0
)
if
(
numericvar_to_double
(
nv
,
&
tmp
)
!=
0
)
return
-
1
;
*
dp
=
tmp
;
return
0
;
...
...
src/interfaces/ecpg/pgtypeslib/timestamp.c
View file @
2720c570
/*
* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/timestamp.c,v 1.4
5 2009/06/11 14:49:13 momjian
Exp $
* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/timestamp.c,v 1.4
6 2009/09/03 09:59:20 meskes
Exp $
*/
#include "postgres_fe.h"
...
...
@@ -237,8 +237,6 @@ recalc_t:
if
(
tzn
!=
NULL
)
*
tzn
=
NULL
;
#endif
dt
=
dt2local
(
dt
,
*
tzp
);
}
else
{
...
...
src/interfaces/ecpg/preproc/type.c
View file @
2720c570
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.8
4 2009/08/07 10:51
:20 meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.8
5 2009/09/03 09:59
:20 meskes Exp $ */
#include "postgres_fe.h"
...
...
@@ -228,7 +228,7 @@ static void ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
char
*
varcharsize
,
char
*
arrsiz
,
const
char
*
siz
,
const
char
*
prefix
,
int
);
static
void
ECPGdump_a_struct
(
FILE
*
o
,
const
char
*
name
,
const
char
*
ind_name
,
char
*
arrsiz
,
struct
ECPGtype
*
type
,
struct
ECPGtype
*
ind_type
,
const
char
*
offset
,
const
char
*
prefix
,
const
char
*
ind_prefix
);
struct
ECPGtype
*
type
,
struct
ECPGtype
*
ind_type
,
const
char
*
prefix
,
const
char
*
ind_prefix
);
void
ECPGdump_a_type
(
FILE
*
o
,
const
char
*
name
,
struct
ECPGtype
*
type
,
...
...
@@ -254,7 +254,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type,
type
->
size
,
type
->
u
.
element
,
(
ind_type
==
NULL
)
?
NULL
:
((
ind_type
->
type
==
ECPGt_NO_INDICATOR
)
?
ind_type
:
ind_type
->
u
.
element
),
NULL
,
prefix
,
ind_prefix
);
prefix
,
ind_prefix
);
break
;
default:
if
(
!
IS_SIMPLE_TYPE
(
type
->
u
.
element
->
type
))
...
...
@@ -280,7 +280,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type,
if
(
indicator_set
&&
ind_type
->
type
!=
ECPGt_struct
)
mmerror
(
INDICATOR_NOT_STRUCT
,
ET_FATAL
,
"indicator for struct has to be a struct"
);
ECPGdump_a_struct
(
o
,
name
,
ind_name
,
make_str
(
"1"
),
type
,
ind_type
,
NULL
,
prefix
,
ind_prefix
);
ECPGdump_a_struct
(
o
,
name
,
ind_name
,
make_str
(
"1"
),
type
,
ind_type
,
prefix
,
ind_prefix
);
break
;
case
ECPGt_union
:
/* cannot dump a complete union */
base_yyerror
(
"type of union has to be specified"
);
...
...
@@ -459,7 +459,7 @@ ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
/* Penetrate a struct and dump the contents. */
static
void
ECPGdump_a_struct
(
FILE
*
o
,
const
char
*
name
,
const
char
*
ind_name
,
char
*
arrsiz
,
struct
ECPGtype
*
type
,
struct
ECPGtype
*
ind_type
,
const
char
*
offsetarg
,
const
char
*
prefix
,
const
char
*
ind_prefix
)
ECPGdump_a_struct
(
FILE
*
o
,
const
char
*
name
,
const
char
*
ind_name
,
char
*
arrsiz
,
struct
ECPGtype
*
type
,
struct
ECPGtype
*
ind_type
,
const
char
*
prefix
,
const
char
*
ind_prefix
)
{
/*
* If offset is NULL, then this is the first recursive level. If not then
...
...
@@ -467,18 +467,8 @@ ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsiz,
*/
struct
ECPGstruct_member
*
p
,
*
ind_p
=
NULL
;
char
obuf
[
BUFSIZ
];
char
pbuf
[
BUFSIZ
],
ind_pbuf
[
BUFSIZ
];
const
char
*
offset
;
if
(
offsetarg
==
NULL
)
{
sprintf
(
obuf
,
"sizeof(%s)"
,
name
);
offset
=
obuf
;
}
else
offset
=
offsetarg
;
if
(
atoi
(
arrsiz
)
==
1
)
sprintf
(
pbuf
,
"%s%s."
,
prefix
?
prefix
:
""
,
name
);
...
...
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