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
673b5275
Commit
673b5275
authored
Aug 27, 2013
by
Alvaro Herrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some "translator:" comments mangled by pgindent
parent
8d00ab63
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
134 deletions
+55
-134
src/bin/psql/describe.c
src/bin/psql/describe.c
+3
-4
src/interfaces/ecpg/ecpglib/error.c
src/interfaces/ecpg/ecpglib/error.c
+52
-130
No files found.
src/bin/psql/describe.c
View file @
673b5275
...
...
@@ -2372,10 +2372,9 @@ add_tablespace_footer(printTableContent *const cont, char relkind,
/* Append the tablespace to the latest footer */
printfPQExpBuffer
(
&
buf
,
"%s"
,
cont
->
footer
->
data
);
/*
* translator: before this string there's an index
* description like '"foo_pkey" PRIMARY KEY, btree (a)'
*/
/*-------
translator: before this string there's an index description like
'"foo_pkey" PRIMARY KEY, btree (a)' */
appendPQExpBuffer
(
&
buf
,
_
(
", tablespace
\"
%s
\"
"
),
PQgetvalue
(
result
,
0
,
0
));
printTableSetFooter
(
cont
,
buf
.
data
);
...
...
src/interfaces/ecpg/ecpglib/error.c
View file @
673b5275
...
...
@@ -21,260 +21,182 @@ ecpg_raise(int line, int code, const char *sqlstate, const char *str)
{
case
ECPG_NOT_FOUND
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"no data found on line %d"
),
line
);
break
;
case
ECPG_OUT_OF_MEMORY
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"out of memory on line %d"
),
line
);
break
;
case
ECPG_UNSUPPORTED
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"unsupported type
\"
%s
\"
on line %d"
),
str
,
line
);
break
;
case
ECPG_TOO_MANY_ARGUMENTS
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"too many arguments on line %d"
),
line
);
break
;
case
ECPG_TOO_FEW_ARGUMENTS
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"too few arguments on line %d"
),
line
);
break
;
case
ECPG_INT_FORMAT
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"invalid input syntax for type int:
\"
%s
\"
, on line %d"
),
str
,
line
);
break
;
case
ECPG_UINT_FORMAT
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"invalid input syntax for type unsigned int:
\"
%s
\"
, on line %d"
),
str
,
line
);
break
;
case
ECPG_FLOAT_FORMAT
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"invalid input syntax for floating-point type:
\"
%s
\"
, on line %d"
),
str
,
line
);
break
;
case
ECPG_CONVERT_BOOL
:
if
(
str
)
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"invalid syntax for type boolean:
\"
%s
\"
, on line %d"
),
str
,
line
);
else
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"could not convert boolean value: size mismatch, on line %d"
),
line
);
break
;
case
ECPG_EMPTY
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"empty query on line %d"
),
line
);
break
;
case
ECPG_MISSING_INDICATOR
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"null value without indicator on line %d"
),
line
);
break
;
case
ECPG_NO_ARRAY
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"variable does not have an array type on line %d"
),
line
);
break
;
case
ECPG_DATA_NOT_ARRAY
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"data read from server is not an array on line %d"
),
line
);
break
;
case
ECPG_ARRAY_INSERT
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"inserting an array of variables is not supported on line %d"
),
line
);
break
;
case
ECPG_NO_CONN
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"connection
\"
%s
\"
does not exist on line %d"
),
str
,
line
);
break
;
case
ECPG_NOT_CONN
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"not connected to connection
\"
%s
\"
on line %d"
),
str
,
line
);
break
;
case
ECPG_INVALID_STMT
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"invalid statement name
\"
%s
\"
on line %d"
),
str
,
line
);
break
;
case
ECPG_UNKNOWN_DESCRIPTOR
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"descriptor
\"
%s
\"
not found on line %d"
),
str
,
line
);
break
;
case
ECPG_INVALID_DESCRIPTOR_INDEX
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"descriptor index out of range on line %d"
),
line
);
break
;
case
ECPG_UNKNOWN_DESCRIPTOR_ITEM
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"unrecognized descriptor item
\"
%s
\"
on line %d"
),
str
,
line
);
break
;
case
ECPG_VAR_NOT_NUMERIC
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"variable does not have a numeric type on line %d"
),
line
);
break
;
case
ECPG_VAR_NOT_CHAR
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"variable does not have a character type on line %d"
),
line
);
break
;
case
ECPG_TRANS
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"error in transaction processing on line %d"
),
line
);
break
;
case
ECPG_CONNECT
:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"could not connect to database
\"
%s
\"
on line %d"
),
str
,
line
);
break
;
default:
snprintf
(
sqlca
->
sqlerrm
.
sqlerrmc
,
sizeof
(
sqlca
->
sqlerrm
.
sqlerrmc
),
/*
* translator: this string will be truncated at 149 characters
* expanded.
*/
/*------
translator: this string will be truncated at 149 characters expanded. */
ecpg_gettext
(
"SQL error %d on line %d"
),
code
,
line
);
break
;
}
...
...
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