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

Commitf06588a

Browse files
Exclude special values in recovery_target_time
recovery_target_time accepts timestamp input, thoughdoes not allow use of special values, e.g. “today”.Report a useful error message for these cases.Reported-by: Piotr StefaniakAuthor: Simon RiggsDiscussion:https://postgr.es/m/CANP8+jJdKA+BkkYLWz9zAm16Y0s2ExBv0WfpAwXdTpPfWnA9Bg@mail.gmail.com
1 parent793a89c commitf06588a

File tree

1 file changed

+12
-0
lines changed
  • src/backend/access/transam

1 file changed

+12
-0
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5265,6 +5265,18 @@ readRecoveryCommandFile(void)
52655265
{
52665266
recoveryTarget=RECOVERY_TARGET_TIME;
52675267

5268+
if (strcmp(item->value,"epoch")==0||
5269+
strcmp(item->value,"infinity")==0||
5270+
strcmp(item->value,"-infinity")==0||
5271+
strcmp(item->value,"now")==0||
5272+
strcmp(item->value,"today")==0||
5273+
strcmp(item->value,"tomorrow")==0||
5274+
strcmp(item->value,"yesterday")==0)
5275+
ereport(FATAL,
5276+
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
5277+
errmsg("recovery_target_time is not a valid timestamp: \"%s\"",
5278+
item->value)));
5279+
52685280
/*
52695281
* Convert the time string given by the user to TimestampTz form.
52705282
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp