Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
c4a13c7e
Commit
c4a13c7e
authored
16 years ago
by
Michael Meskes
Browse files
Options
Downloads
Patches
Plain Diff
When creating a varchar struct name braces must be discarded.
parent
f900afff
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/interfaces/ecpg/ChangeLog
+4
-0
4 additions, 0 deletions
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/preproc/type.c
+10
-5
10 additions, 5 deletions
src/interfaces/ecpg/preproc/type.c
with
14 additions
and
5 deletions
src/interfaces/ecpg/ChangeLog
+
4
−
0
View file @
c4a13c7e
...
@@ -2390,6 +2390,10 @@ Tue, 14 Oct 2008 11:25:51 +0200
...
@@ -2390,6 +2390,10 @@ Tue, 14 Oct 2008 11:25:51 +0200
Sat, 25 Oct 2008 16:34:28 +0200
Sat, 25 Oct 2008 16:34:28 +0200
- Free allocated memory even if the next alloc failed with ENOMEM.
- Free allocated memory even if the next alloc failed with ENOMEM.
Wed, 26 Nov 2008 14:09:08 +0100
- When creating a varchar struct name braces must be discarded.
- Set pgtypes library version to 3.1.
- Set pgtypes library version to 3.1.
- Set compat library version to 3.1.
- Set compat library version to 3.1.
- Set ecpg library version to 6.2.
- Set ecpg library version to 6.2.
...
...
This diff is collapsed.
Click to expand it.
src/interfaces/ecpg/preproc/type.c
+
10
−
5
View file @
c4a13c7e
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.
79
2008/
05/16 15:20:04 petere
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.
80
2008/
11/26 13:18:22 meskes
Exp $ */
#include
"postgres_fe.h"
#include
"postgres_fe.h"
...
@@ -327,8 +327,9 @@ ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
...
@@ -327,8 +327,9 @@ ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
fprintf
(
o
,
"
\n\t
ECPGt_descriptor, %s, 0L, 0L, 0L, "
,
name
);
fprintf
(
o
,
"
\n\t
ECPGt_descriptor, %s, 0L, 0L, 0L, "
,
name
);
else
else
{
{
char
*
variable
=
(
char
*
)
mm_alloc
(
strlen
(
name
)
+
((
prefix
==
NULL
)
?
0
:
strlen
(
prefix
))
+
4
);
char
*
variable
=
(
char
*
)
mm_alloc
(
strlen
(
name
)
+
((
prefix
==
NULL
)
?
0
:
strlen
(
prefix
))
+
4
);
char
*
offset
=
(
char
*
)
mm_alloc
(
strlen
(
name
)
+
strlen
(
"sizeof(struct varchar_)"
)
+
1
+
strlen
(
varcharsize
)
+
sizeof
(
int
)
*
CHAR_BIT
*
10
/
3
);
char
*
offset
=
(
char
*
)
mm_alloc
(
strlen
(
name
)
+
strlen
(
"sizeof(struct varchar_)"
)
+
1
+
strlen
(
varcharsize
)
+
sizeof
(
int
)
*
CHAR_BIT
*
10
/
3
);
char
*
var_name
;
switch
(
type
)
switch
(
type
)
{
{
...
@@ -350,10 +351,14 @@ ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
...
@@ -350,10 +351,14 @@ ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
else
else
sprintf
(
variable
,
"&(%s%s)"
,
prefix
?
prefix
:
""
,
name
);
sprintf
(
variable
,
"&(%s%s)"
,
prefix
?
prefix
:
""
,
name
);
/* remove trailing [] is name is array element */
var_name
=
strdup
(
name
);
*
(
strchrnul
(
var_name
,
'['
))
=
'\0'
;
if
(
lineno
)
if
(
lineno
)
sprintf
(
offset
,
"sizeof(struct varchar_%s_%d)"
,
name
,
lineno
);
sprintf
(
offset
,
"sizeof(struct varchar_%s_%d)"
,
var_
name
,
lineno
);
else
else
sprintf
(
offset
,
"sizeof(struct varchar_%s)"
,
name
);
sprintf
(
offset
,
"sizeof(struct varchar_%s)"
,
var_name
);
free
(
var_name
);
break
;
break
;
case
ECPGt_char
:
case
ECPGt_char
:
case
ECPGt_unsigned_char
:
case
ECPGt_unsigned_char
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment