Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9d13fcf

Browse files
author
Hiroshi Inoue
committed
Fix the bug reported by Chris Lee.
1 parentf9e6e27 commit9d13fcf

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

‎src/interfaces/odbc/convert.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ copy_statement_with_parameters(StatementClass *stmt)
974974
ConnectionClass*conn=SC_get_conn(stmt);
975975
ConnInfo*ci=&(conn->connInfo);
976976
BOOLprepare_dummy_cursor= FALSE,begin_first= FALSE;
977-
chartoken_save[32];
977+
chartoken_save[64];
978978
inttoken_len;
979979
BOOLprev_token_end;
980980
#ifdefDRIVER_CURSOR_IMPLEMENT
@@ -1247,7 +1247,7 @@ copy_statement_with_parameters(StatementClass *stmt)
12471247
token_save[0]=oldchar;
12481248
token_len=1;
12491249
}
1250-
else
1250+
elseif (token_len+1<sizeof(token_save))
12511251
token_save[token_len++]=oldchar;
12521252
}
12531253
CVT_APPEND_CHAR(oldchar);

‎src/interfaces/odbc/pgtypes.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -586,10 +586,10 @@ pgtype_precision(StatementClass *stmt, Int4 type, int col, int handle_unknown_si
586586
return8;
587587

588588
casePG_TYPE_ABSTIME:
589-
casePG_TYPE_DATETIME:
590589
casePG_TYPE_TIMESTAMP:
591-
/*return 19;*/
592-
return21;
590+
return22;
591+
casePG_TYPE_DATETIME:
592+
return22;
593593

594594
casePG_TYPE_BOOL:
595595
return1;
@@ -678,12 +678,12 @@ pgtype_length(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_
678678

679679
casePG_TYPE_DATE:
680680
casePG_TYPE_TIME:
681-
return6;
681+
return6;/* sizeof(DATE(TIME)_STRUCT) */
682682

683683
casePG_TYPE_ABSTIME:
684684
casePG_TYPE_DATETIME:
685685
casePG_TYPE_TIMESTAMP:
686-
return16;
686+
return16;/* sizeof(TIMESTAMP_STRUCT) */
687687

688688
/* Character types (and NUMERIC) use the default precision */
689689
casePG_TYPE_VARCHAR:
@@ -723,9 +723,10 @@ pgtype_scale(StatementClass *stmt, Int4 type, int col)
723723
* "yyyy-mm=dd hh:mm:ss[.f...]"
724724
*/
725725
casePG_TYPE_ABSTIME:
726-
casePG_TYPE_DATETIME:
727726
casePG_TYPE_TIMESTAMP:
728727
return0;
728+
casePG_TYPE_DATETIME:
729+
return0;
729730

730731
casePG_TYPE_NUMERIC:
731732
returngetNumericScale(stmt,type,col);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp