Message fixes and style improvements

This commit is contained in:
Peter Eisentraut 2020-09-14 06:42:07 +02:00
parent ac673a1aaf
commit 3e0242b24c
24 changed files with 92 additions and 89 deletions

View File

@ -677,11 +677,10 @@ heap_vacuum_rel(Relation onerel, VacuumParams *params,
read_rate, write_rate); read_rate, write_rate);
appendStringInfo(&buf, _("system usage: %s\n"), pg_rusage_show(&ru0)); appendStringInfo(&buf, _("system usage: %s\n"), pg_rusage_show(&ru0));
appendStringInfo(&buf, appendStringInfo(&buf,
_("WAL usage: %ld records, %ld full page images, " _("WAL usage: %ld records, %ld full page images, %llu bytes"),
UINT64_FORMAT " bytes"),
walusage.wal_records, walusage.wal_records,
walusage.wal_fpi, walusage.wal_fpi,
walusage.wal_bytes); (unsigned long long) walusage.wal_bytes);
ereport(LOG, ereport(LOG,
(errmsg_internal("%s", buf.data))); (errmsg_internal("%s", buf.data)));
@ -3523,9 +3522,10 @@ parallel_vacuum_main(dsm_segment *seg, shm_toc *toc)
false); false);
elevel = lvshared->elevel; elevel = lvshared->elevel;
ereport(DEBUG1, if (lvshared->for_cleanup)
(errmsg("starting parallel vacuum worker for %s", elog(DEBUG1, "starting parallel vacuum worker for cleanup");
lvshared->for_cleanup ? "cleanup" : "bulk delete"))); else
elog(DEBUG1, "starting parallel vacuum worker for bulk delete");
/* Set debug_query_string for individual workers */ /* Set debug_query_string for individual workers */
sharedquery = shm_toc_lookup(toc, PARALLEL_VACUUM_KEY_QUERY_TEXT, false); sharedquery = shm_toc_lookup(toc, PARALLEL_VACUUM_KEY_QUERY_TEXT, false);

View File

@ -12504,7 +12504,7 @@ StartupRequestWalReceiverRestart(void)
if (currentSource == XLOG_FROM_STREAM && WalRcvRunning()) if (currentSource == XLOG_FROM_STREAM && WalRcvRunning())
{ {
ereport(LOG, ereport(LOG,
(errmsg("wal receiver process shutdown requested"))); (errmsg("WAL receiver process shutdown requested")));
pendingWalRcvRestart = true; pendingWalRcvRestart = true;
} }

View File

@ -1212,14 +1212,14 @@ assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid,
(OidIsValid(member->righttype) && member->righttype != typeoid)) (OidIsValid(member->righttype) && member->righttype != typeoid))
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION), (errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("associated data types for opclass options parsing functions must match opclass input type"))); errmsg("associated data types for operator class options parsing functions must match opclass input type")));
} }
else else
{ {
if (member->lefttype != member->righttype) if (member->lefttype != member->righttype)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION), (errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("left and right associated data types for opclass options parsing functions must match"))); errmsg("left and right associated data types for operator class options parsing functions must match")));
} }
if (procform->prorettype != VOIDOID || if (procform->prorettype != VOIDOID ||
@ -1227,8 +1227,8 @@ assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid,
procform->proargtypes.values[0] != INTERNALOID) procform->proargtypes.values[0] != INTERNALOID)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION), (errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("invalid opclass options parsing function"), errmsg("invalid operator class options parsing function"),
errhint("Valid signature of opclass options parsing function is '%s'.", errhint("Valid signature of operator class options parsing function is %s.",
"(internal) RETURNS void"))); "(internal) RETURNS void")));
} }

View File

@ -6855,7 +6855,7 @@ NotNullImpliedByRelConstraints(Relation rel, Form_pg_attribute attr)
if (ConstraintImpliedByRelConstraint(rel, list_make1(nnulltest), NIL)) if (ConstraintImpliedByRelConstraint(rel, list_make1(nnulltest), NIL))
{ {
ereport(DEBUG1, ereport(DEBUG1,
(errmsg("existing constraints on column \"%s\".\"%s\" are sufficient to prove that it does not contain nulls", (errmsg("existing constraints on column \"%s.%s\" are sufficient to prove that it does not contain nulls",
RelationGetRelationName(rel), NameStr(attr->attname)))); RelationGetRelationName(rel), NameStr(attr->attname))));
return true; return true;
} }

View File

@ -1746,10 +1746,10 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline,
{ {
ereport(elevel, ereport(elevel,
(errcode(ERRCODE_CONFIG_FILE_ERROR), (errcode(ERRCODE_CONFIG_FILE_ERROR),
errmsg("clientcert can not be set to \"no-verify\" when using \"cert\" authentication"), errmsg("clientcert cannot be set to \"no-verify\" when using \"cert\" authentication"),
errcontext("line %d of configuration file \"%s\"", errcontext("line %d of configuration file \"%s\"",
line_num, HbaFileName))); line_num, HbaFileName)));
*err_msg = "clientcert can not be set to \"no-verify\" when using \"cert\" authentication"; *err_msg = "clientcert cannot be set to \"no-verify\" when using \"cert\" authentication";
return false; return false;
} }
hbaline->clientcert = clientCertOff; hbaline->clientcert = clientCertOff;

View File

@ -414,9 +414,9 @@ ParamsErrorCallback(void *arg)
return; return;
if (data->portalName && data->portalName[0] != '\0') if (data->portalName && data->portalName[0] != '\0')
errcontext("extended query \"%s\" with parameters: %s", errcontext("portal \"%s\" with parameters: %s",
data->portalName, data->params->paramValuesStr); data->portalName, data->params->paramValuesStr);
else else
errcontext("extended query with parameters: %s", errcontext("unnamed portal with parameters: %s",
data->params->paramValuesStr); data->params->paramValuesStr);
} }

View File

@ -15919,7 +15919,7 @@ insertSelectOptions(SelectStmt *stmt,
if (!stmt->sortClause && limitClause->limitOption == LIMIT_OPTION_WITH_TIES) if (!stmt->sortClause && limitClause->limitOption == LIMIT_OPTION_WITH_TIES)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR), (errcode(ERRCODE_SYNTAX_ERROR),
errmsg("WITH TIES options can not be specified without ORDER BY clause"))); errmsg("WITH TIES cannot be specified without ORDER BY clause")));
stmt->limitOption = limitClause->limitOption; stmt->limitOption = limitClause->limitOption;
} }
if (withClause) if (withClause)

View File

@ -1770,7 +1770,7 @@ transformLimitClause(ParseState *pstate, Node *clause,
IsA(clause, A_Const) && ((A_Const *) clause)->val.type == T_Null) IsA(clause, A_Const) && ((A_Const *) clause)->val.type == T_Null)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INVALID_ROW_COUNT_IN_LIMIT_CLAUSE), (errcode(ERRCODE_INVALID_ROW_COUNT_IN_LIMIT_CLAUSE),
errmsg("row count cannot be NULL in FETCH FIRST ... WITH TIES clause"))); errmsg("row count cannot be null in FETCH FIRST ... WITH TIES clause")));
return qual; return qual;
} }

View File

@ -719,7 +719,10 @@ perform_base_backup(basebackup_options *opt)
{ {
if (total_checksum_failures > 1) if (total_checksum_failures > 1)
ereport(WARNING, ereport(WARNING,
(errmsg("%lld total checksum verification failures", total_checksum_failures))); (errmsg_plural("%lld total checksum verification failure",
"%lld total checksum verification failures",
total_checksum_failures,
total_checksum_failures)));
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED), (errcode(ERRCODE_DATA_CORRUPTED),

View File

@ -3627,7 +3627,7 @@ TerminateOtherDBBackends(Oid databaseId)
if (nprepared > 0) if (nprepared > 0)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_OBJECT_IN_USE), (errcode(ERRCODE_OBJECT_IN_USE),
errmsg("database \"%s\" is being used by prepared transaction", errmsg("database \"%s\" is being used by prepared transactions",
get_database_name(databaseId)), get_database_name(databaseId)),
errdetail_plural("There is %d prepared transaction using the database.", errdetail_plural("There is %d prepared transaction using the database.",
"There are %d prepared transactions using the database.", "There are %d prepared transactions using the database.",

View File

@ -2582,9 +2582,9 @@ checkTimezoneIsUsedForCast(bool useTz, const char *type1, const char *type2)
if (!useTz) if (!useTz)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot convert value from %s to %s without timezone usage", errmsg("cannot convert value from %s to %s without time zone usage",
type1, type2), type1, type2),
errhint("Use *_tz() function for timezone support."))); errhint("Use *_tz() function for time zone support.")));
} }
/* Convert time datum to timetz datum */ /* Convert time datum to timetz datum */

View File

@ -2000,7 +2000,7 @@ get_fn_opclass_options(FmgrInfo *flinfo)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE), (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("opclass options info is absent in function call context"))); errmsg("operator class options info is absent in function call context")));
return NULL; return NULL;
} }

View File

@ -2837,7 +2837,7 @@ static struct config_int ConfigureNamesInt[] =
gettext_noop("Sets the minimum execution time above which " gettext_noop("Sets the minimum execution time above which "
"a sample of statements will be logged." "a sample of statements will be logged."
" Sampling is determined by log_statement_sample_rate."), " Sampling is determined by log_statement_sample_rate."),
gettext_noop("Zero log a sample of all queries. -1 turns this feature off."), gettext_noop("Zero logs a sample of all queries. -1 turns this feature off."),
GUC_UNIT_MS GUC_UNIT_MS
}, },
&log_min_duration_sample, &log_min_duration_sample,
@ -3700,7 +3700,7 @@ static struct config_string ConfigureNamesString[] =
{ {
{"restore_command", PGC_POSTMASTER, WAL_ARCHIVE_RECOVERY, {"restore_command", PGC_POSTMASTER, WAL_ARCHIVE_RECOVERY,
gettext_noop("Sets the shell command that will retrieve an archived WAL file."), gettext_noop("Sets the shell command that will be called to retrieve an archived WAL file."),
NULL NULL
}, },
&recoveryRestoreCommand, &recoveryRestoreCommand,

View File

@ -566,7 +566,7 @@ sts_parallel_scan_next(SharedTuplestoreAccessor *accessor, void *meta_data)
if (BufFileSeekBlock(accessor->read_file, read_page) != 0) if (BufFileSeekBlock(accessor->read_file, read_page) != 0)
ereport(ERROR, ereport(ERROR,
(errcode_for_file_access(), (errcode_for_file_access(),
errmsg("could not seek block %u in shared tuplestore temporary file", errmsg("could not seek to block %u in shared tuplestore temporary file",
read_page))); read_page)));
nread = BufFileRead(accessor->read_file, &chunk_header, nread = BufFileRead(accessor->read_file, &chunk_header,
STS_CHUNK_HEADER_SIZE); STS_CHUNK_HEADER_SIZE);

View File

@ -325,7 +325,7 @@ json_manifest_object_field_start(void *state, char *fname, bool isnull)
/* It's not a field we recognize. */ /* It's not a field we recognize. */
json_manifest_parse_failure(parse->context, json_manifest_parse_failure(parse->context,
"unknown toplevel field"); "unrecognized top-level field");
break; break;
case JM_EXPECT_THIS_FILE_FIELD: case JM_EXPECT_THIS_FILE_FIELD:
@ -358,7 +358,7 @@ json_manifest_object_field_start(void *state, char *fname, bool isnull)
parse->wal_range_field = JMWRF_END_LSN; parse->wal_range_field = JMWRF_END_LSN;
else else
json_manifest_parse_failure(parse->context, json_manifest_parse_failure(parse->context,
"unexpected wal range field"); "unexpected WAL range field");
parse->state = JM_EXPECT_THIS_WAL_RANGE_VALUE; parse->state = JM_EXPECT_THIS_WAL_RANGE_VALUE;
break; break;
@ -469,10 +469,10 @@ json_manifest_finalize_file(JsonManifestParseState *parse)
/* Pathname and size are required. */ /* Pathname and size are required. */
if (parse->pathname == NULL && parse->encoded_pathname == NULL) if (parse->pathname == NULL && parse->encoded_pathname == NULL)
json_manifest_parse_failure(parse->context, "missing pathname"); json_manifest_parse_failure(parse->context, "missing path name");
if (parse->pathname != NULL && parse->encoded_pathname != NULL) if (parse->pathname != NULL && parse->encoded_pathname != NULL)
json_manifest_parse_failure(parse->context, json_manifest_parse_failure(parse->context,
"both pathname and encoded pathname"); "both path name and encoded path name");
if (parse->size == NULL) if (parse->size == NULL)
json_manifest_parse_failure(parse->context, "missing size"); json_manifest_parse_failure(parse->context, "missing size");
if (parse->algorithm == NULL && parse->checksum != NULL) if (parse->algorithm == NULL && parse->checksum != NULL)
@ -491,7 +491,7 @@ json_manifest_finalize_file(JsonManifestParseState *parse)
parse->encoded_pathname, parse->encoded_pathname,
raw_length)) raw_length))
json_manifest_parse_failure(parse->context, json_manifest_parse_failure(parse->context,
"unable to decode filename"); "could not decode file name");
parse->pathname[raw_length] = '\0'; parse->pathname[raw_length] = '\0';
pfree(parse->encoded_pathname); pfree(parse->encoded_pathname);
parse->encoded_pathname = NULL; parse->encoded_pathname = NULL;
@ -582,10 +582,10 @@ json_manifest_finalize_wal_range(JsonManifestParseState *parse)
"timeline is not an integer"); "timeline is not an integer");
if (!parse_xlogrecptr(&start_lsn, parse->start_lsn)) if (!parse_xlogrecptr(&start_lsn, parse->start_lsn))
json_manifest_parse_failure(parse->context, json_manifest_parse_failure(parse->context,
"unable to parse start LSN"); "could not parse start LSN");
if (!parse_xlogrecptr(&end_lsn, parse->end_lsn)) if (!parse_xlogrecptr(&end_lsn, parse->end_lsn))
json_manifest_parse_failure(parse->context, json_manifest_parse_failure(parse->context,
"unable to parse end LSN"); "could not parse end LSN");
/* Invoke the callback with the details we've gathered. */ /* Invoke the callback with the details we've gathered. */
context->perwalrange_cb(context, tli, start_lsn, end_lsn); context->perwalrange_cb(context, tli, start_lsn, end_lsn);

View File

@ -471,7 +471,7 @@ record_manifest_details_for_file(JsonManifestParseContext *context,
/* Make a new entry in the hash table for this file. */ /* Make a new entry in the hash table for this file. */
m = manifest_files_insert(ht, pathname, &found); m = manifest_files_insert(ht, pathname, &found);
if (found) if (found)
report_fatal_error("duplicate pathname in backup manifest: \"%s\"", report_fatal_error("duplicate path name in backup manifest: \"%s\"",
pathname); pathname);
/* Initialize the entry. */ /* Initialize the entry. */

View File

@ -38,7 +38,7 @@ test_parse_error('unexpected scalar', <<EOM);
{"PostgreSQL-Backup-Manifest-Version": 1, "Files": true} {"PostgreSQL-Backup-Manifest-Version": 1, "Files": true}
EOM EOM
test_parse_error('unknown toplevel field', <<EOM); test_parse_error('unrecognized top-level field', <<EOM);
{"PostgreSQL-Backup-Manifest-Version": 1, "Oops": 1} {"PostgreSQL-Backup-Manifest-Version": 1, "Oops": 1}
EOM EOM
@ -46,11 +46,11 @@ test_parse_error('unexpected object start', <<EOM);
{"PostgreSQL-Backup-Manifest-Version": 1, "Files": {}} {"PostgreSQL-Backup-Manifest-Version": 1, "Files": {}}
EOM EOM
test_parse_error('missing pathname', <<EOM); test_parse_error('missing path name', <<EOM);
{"PostgreSQL-Backup-Manifest-Version": 1, "Files": [{}]} {"PostgreSQL-Backup-Manifest-Version": 1, "Files": [{}]}
EOM EOM
test_parse_error('both pathname and encoded pathname', <<EOM); test_parse_error('both path name and encoded path name', <<EOM);
{"PostgreSQL-Backup-Manifest-Version": 1, "Files": [ {"PostgreSQL-Backup-Manifest-Version": 1, "Files": [
{"Path": "x", "Encoded-Path": "1234"} {"Path": "x", "Encoded-Path": "1234"}
]} ]}
@ -74,13 +74,13 @@ test_parse_error('file size is not an integer', <<EOM);
]} ]}
EOM EOM
test_parse_error('unable to decode filename', <<EOM); test_parse_error('could not decode file name', <<EOM);
{"PostgreSQL-Backup-Manifest-Version": 1, "Files": [ {"PostgreSQL-Backup-Manifest-Version": 1, "Files": [
{"Encoded-Path": "123", "Size": 0} {"Encoded-Path": "123", "Size": 0}
]} ]}
EOM EOM
test_fatal_error('duplicate pathname in backup manifest', <<EOM); test_fatal_error('duplicate path name in backup manifest', <<EOM);
{"PostgreSQL-Backup-Manifest-Version": 1, "Files": [ {"PostgreSQL-Backup-Manifest-Version": 1, "Files": [
{"Path": "x", "Size": 0}, {"Path": "x", "Size": 0},
{"Path": "x", "Size": 0} {"Path": "x", "Size": 0}
@ -117,7 +117,7 @@ test_parse_error('missing end LSN', <<EOM);
]} ]}
EOM EOM
test_parse_error('unexpected wal range field', <<EOM); test_parse_error('unexpected WAL range field', <<EOM);
{"PostgreSQL-Backup-Manifest-Version": 1, "WAL-Ranges": [ {"PostgreSQL-Backup-Manifest-Version": 1, "WAL-Ranges": [
{"Oops": 1} {"Oops": 1}
]} ]}
@ -141,13 +141,13 @@ test_parse_error('timeline is not an integer', <<EOM);
]} ]}
EOM EOM
test_parse_error('unable to parse start LSN', <<EOM); test_parse_error('could not parse start LSN', <<EOM);
{"PostgreSQL-Backup-Manifest-Version": 1, "WAL-Ranges": [ {"PostgreSQL-Backup-Manifest-Version": 1, "WAL-Ranges": [
{"Timeline": 1, "Start-LSN": "oops", "End-LSN": "0/0"} {"Timeline": 1, "Start-LSN": "oops", "End-LSN": "0/0"}
]} ]}
EOM EOM
test_parse_error('unable to parse end LSN', <<EOM); test_parse_error('could not parse end LSN', <<EOM);
{"PostgreSQL-Backup-Manifest-Version": 1, "WAL-Ranges": [ {"PostgreSQL-Backup-Manifest-Version": 1, "WAL-Ranges": [
{"Timeline": 1, "Start-LSN": "0/0", "End-LSN": "oops"} {"Timeline": 1, "Start-LSN": "0/0", "End-LSN": "oops"}
]} ]}

View File

@ -287,7 +287,7 @@ pgbench(
[], [],
[ [
qr{ERROR: invalid input syntax for type json}, qr{ERROR: invalid input syntax for type json},
qr{(?!extended query with parameters)} qr{(?!unnamed portal with parameters)}
], ],
'server parameter logging', 'server parameter logging',
{ {
@ -314,7 +314,7 @@ pgbench(
[], [],
[ [
qr{ERROR: division by zero}, qr{ERROR: division by zero},
qr{CONTEXT: extended query with parameters: \$1 = '1', \$2 = NULL} qr{CONTEXT: unnamed portal with parameters: \$1 = '1', \$2 = NULL}
], ],
'server parameter logging', 'server parameter logging',
{ {
@ -328,7 +328,7 @@ pgbench(
[], [],
[ [
qr{ERROR: invalid input syntax for type json}, qr{ERROR: invalid input syntax for type json},
qr[CONTEXT: JSON data, line 1: \{ invalid\.\.\.[\r\n]+extended query with parameters: \$1 = '\{ invalid ', \$2 = '''Valame Dios!'' dijo Sancho; ''no le dije yo a vuestra merced que \.\.\.']m qr[CONTEXT: JSON data, line 1: \{ invalid\.\.\.[\r\n]+unnamed portal with parameters: \$1 = '\{ invalid ', \$2 = '''Valame Dios!'' dijo Sancho; ''no le dije yo a vuestra merced que \.\.\.']m
], ],
'server parameter logging', 'server parameter logging',
{ {
@ -356,7 +356,7 @@ pgbench(
[], [],
[ [
qr{ERROR: division by zero}, qr{ERROR: division by zero},
qr{CONTEXT: extended query with parameters: \$1 = '1', \$2 = NULL} qr{CONTEXT: unnamed portal with parameters: \$1 = '1', \$2 = NULL}
], ],
'server parameter logging', 'server parameter logging',
{ {
@ -373,7 +373,7 @@ pgbench(
[], [],
[ [
qr{ERROR: invalid input syntax for type json}, qr{ERROR: invalid input syntax for type json},
qr[CONTEXT: JSON data, line 1: \{ invalid\.\.\.[\r\n]+extended query with parameters: \$1 = '\{ invalid ', \$2 = '''Valame Dios!'' dijo Sancho; ''no le dije yo a vuestra merced que mirase bien lo que hacia\?']m qr[CONTEXT: JSON data, line 1: \{ invalid\.\.\.[\r\n]+unnamed portal with parameters: \$1 = '\{ invalid ', \$2 = '''Valame Dios!'' dijo Sancho; ''no le dije yo a vuestra merced que mirase bien lo que hacia\?']m
], ],
'server parameter logging', 'server parameter logging',
{ {

View File

@ -305,7 +305,7 @@ main(int argc, char *argv[])
} }
if (vacopts.full) if (vacopts.full)
{ {
pg_log_error("cannot use the \"%s\" option when performing full", pg_log_error("cannot use the \"%s\" option when performing full vacuum",
"parallel"); "parallel");
exit(1); exit(1);
} }

View File

@ -50,7 +50,7 @@ RestoreArchivedFile(const char *path, const char *xlogfname,
xlogfname, NULL); xlogfname, NULL);
if (xlogRestoreCmd == NULL) if (xlogRestoreCmd == NULL)
{ {
pg_log_fatal("could not use restore_command with %%r alias"); pg_log_fatal("cannot use restore_command with %%r placeholder");
exit(1); exit(1);
} }
@ -109,7 +109,7 @@ RestoreArchivedFile(const char *path, const char *xlogfname,
*/ */
if (wait_result_is_any_signal(rc, true)) if (wait_result_is_any_signal(rc, true))
{ {
pg_log_fatal("restore_command failed due to the signal: %s", pg_log_fatal("restore_command failed: %s",
wait_result_to_str(rc)); wait_result_to_str(rc));
exit(1); exit(1);
} }

View File

@ -56,7 +56,7 @@ run_sql_command(
$output = run_sql_command('alter table atacc1 alter test_a set not null;'); $output = run_sql_command('alter table atacc1 alter test_a set not null;');
ok(!is_table_verified($output), 'with constraint will not scan table'); ok(!is_table_verified($output), 'with constraint will not scan table');
ok( $output =~ ok( $output =~
m/existing constraints on column "atacc1"."test_a" are sufficient to prove that it does not contain nulls/, m/existing constraints on column "atacc1.test_a" are sufficient to prove that it does not contain nulls/,
'test_a proved by constraints'); 'test_a proved by constraints');
run_sql_command('alter table atacc1 alter test_a drop not null;'); run_sql_command('alter table atacc1 alter test_a drop not null;');
@ -68,7 +68,7 @@ $output = run_sql_command(
ok(is_table_verified($output), 'table was scanned'); ok(is_table_verified($output), 'table was scanned');
# we may miss debug message for test_a constraint because we need verify table due test_b # we may miss debug message for test_a constraint because we need verify table due test_b
ok( !( $output =~ ok( !( $output =~
m/existing constraints on column "atacc1"."test_b" are sufficient to prove that it does not contain nulls/ m/existing constraints on column "atacc1.test_b" are sufficient to prove that it does not contain nulls/
), ),
'test_b not proved by wrong constraints'); 'test_b not proved by wrong constraints');
run_sql_command( run_sql_command(
@ -84,10 +84,10 @@ $output = run_sql_command(
); );
ok(!is_table_verified($output), 'table was not scanned for both columns'); ok(!is_table_verified($output), 'table was not scanned for both columns');
ok( $output =~ ok( $output =~
m/existing constraints on column "atacc1"."test_a" are sufficient to prove that it does not contain nulls/, m/existing constraints on column "atacc1.test_a" are sufficient to prove that it does not contain nulls/,
'test_a proved by constraints'); 'test_a proved by constraints');
ok( $output =~ ok( $output =~
m/existing constraints on column "atacc1"."test_b" are sufficient to prove that it does not contain nulls/, m/existing constraints on column "atacc1.test_b" are sufficient to prove that it does not contain nulls/,
'test_b proved by constraints'); 'test_b proved by constraints');
run_sql_command('drop table atacc1;'); run_sql_command('drop table atacc1;');

View File

@ -505,10 +505,10 @@ CREATE OPERATOR FAMILY alt_opf19 USING btree;
ALTER OPERATOR FAMILY alt_opf19 USING btree ADD FUNCTION 5 test_opclass_options_func(internal, text[], bool); ALTER OPERATOR FAMILY alt_opf19 USING btree ADD FUNCTION 5 test_opclass_options_func(internal, text[], bool);
ERROR: function test_opclass_options_func(internal, text[], boolean) does not exist ERROR: function test_opclass_options_func(internal, text[], boolean) does not exist
ALTER OPERATOR FAMILY alt_opf19 USING btree ADD FUNCTION 5 (int4) btint42cmp(int4, int2); ALTER OPERATOR FAMILY alt_opf19 USING btree ADD FUNCTION 5 (int4) btint42cmp(int4, int2);
ERROR: invalid opclass options parsing function ERROR: invalid operator class options parsing function
HINT: Valid signature of opclass options parsing function is '(internal) RETURNS void'. HINT: Valid signature of operator class options parsing function is (internal) RETURNS void.
ALTER OPERATOR FAMILY alt_opf19 USING btree ADD FUNCTION 5 (int4, int2) btint42cmp(int4, int2); ALTER OPERATOR FAMILY alt_opf19 USING btree ADD FUNCTION 5 (int4, int2) btint42cmp(int4, int2);
ERROR: left and right associated data types for opclass options parsing functions must match ERROR: left and right associated data types for operator class options parsing functions must match
ALTER OPERATOR FAMILY alt_opf19 USING btree ADD FUNCTION 5 (int4) test_opclass_options_func(internal); -- Ok ALTER OPERATOR FAMILY alt_opf19 USING btree ADD FUNCTION 5 (int4) test_opclass_options_func(internal); -- Ok
ALTER OPERATOR FAMILY alt_opf19 USING btree DROP FUNCTION 5 (int4, int4); ALTER OPERATOR FAMILY alt_opf19 USING btree DROP FUNCTION 5 (int4, int4);
DROP OPERATOR FAMILY alt_opf19 USING btree; DROP OPERATOR FAMILY alt_opf19 USING btree;

View File

@ -1942,18 +1942,18 @@ set time zone '+00';
select jsonb_path_query( select jsonb_path_query(
'["2017-03-10", "2017-03-11", "2017-03-09", "12:34:56", "01:02:03 +04", "2017-03-10 00:00:00", "2017-03-10 12:34:56", "2017-03-10 01:02:03 +04", "2017-03-10 03:00:00 +03"]', '["2017-03-10", "2017-03-11", "2017-03-09", "12:34:56", "01:02:03 +04", "2017-03-10 00:00:00", "2017-03-10 12:34:56", "2017-03-10 01:02:03 +04", "2017-03-10 03:00:00 +03"]',
'$[*].datetime() ? (@ == "10.03.2017".datetime("dd.mm.yyyy"))'); '$[*].datetime() ? (@ == "10.03.2017".datetime("dd.mm.yyyy"))');
ERROR: cannot convert value from date to timestamptz without timezone usage ERROR: cannot convert value from date to timestamptz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query( select jsonb_path_query(
'["2017-03-10", "2017-03-11", "2017-03-09", "12:34:56", "01:02:03 +04", "2017-03-10 00:00:00", "2017-03-10 12:34:56", "2017-03-10 01:02:03 +04", "2017-03-10 03:00:00 +03"]', '["2017-03-10", "2017-03-11", "2017-03-09", "12:34:56", "01:02:03 +04", "2017-03-10 00:00:00", "2017-03-10 12:34:56", "2017-03-10 01:02:03 +04", "2017-03-10 03:00:00 +03"]',
'$[*].datetime() ? (@ >= "10.03.2017".datetime("dd.mm.yyyy"))'); '$[*].datetime() ? (@ >= "10.03.2017".datetime("dd.mm.yyyy"))');
ERROR: cannot convert value from date to timestamptz without timezone usage ERROR: cannot convert value from date to timestamptz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query( select jsonb_path_query(
'["2017-03-10", "2017-03-11", "2017-03-09", "12:34:56", "01:02:03 +04", "2017-03-10 00:00:00", "2017-03-10 12:34:56", "2017-03-10 01:02:03 +04", "2017-03-10 03:00:00 +03"]', '["2017-03-10", "2017-03-11", "2017-03-09", "12:34:56", "01:02:03 +04", "2017-03-10 00:00:00", "2017-03-10 12:34:56", "2017-03-10 01:02:03 +04", "2017-03-10 03:00:00 +03"]',
'$[*].datetime() ? (@ < "10.03.2017".datetime("dd.mm.yyyy"))'); '$[*].datetime() ? (@ < "10.03.2017".datetime("dd.mm.yyyy"))');
ERROR: cannot convert value from date to timestamptz without timezone usage ERROR: cannot convert value from date to timestamptz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query_tz( select jsonb_path_query_tz(
'["2017-03-10", "2017-03-11", "2017-03-09", "12:34:56", "01:02:03 +04", "2017-03-10 00:00:00", "2017-03-10 12:34:56", "2017-03-10 01:02:03 +04", "2017-03-10 03:00:00 +03"]', '["2017-03-10", "2017-03-11", "2017-03-09", "12:34:56", "01:02:03 +04", "2017-03-10 00:00:00", "2017-03-10 12:34:56", "2017-03-10 01:02:03 +04", "2017-03-10 03:00:00 +03"]',
'$[*].datetime() ? (@ == "10.03.2017".datetime("dd.mm.yyyy"))'); '$[*].datetime() ? (@ == "10.03.2017".datetime("dd.mm.yyyy"))');
@ -1989,18 +1989,18 @@ select jsonb_path_query_tz(
select jsonb_path_query( select jsonb_path_query(
'["12:34:00", "12:35:00", "12:36:00", "12:35:00 +00", "12:35:00 +01", "13:35:00 +01", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +01"]', '["12:34:00", "12:35:00", "12:36:00", "12:35:00 +00", "12:35:00 +01", "13:35:00 +01", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +01"]',
'$[*].datetime() ? (@ == "12:35".datetime("HH24:MI"))'); '$[*].datetime() ? (@ == "12:35".datetime("HH24:MI"))');
ERROR: cannot convert value from time to timetz without timezone usage ERROR: cannot convert value from time to timetz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query( select jsonb_path_query(
'["12:34:00", "12:35:00", "12:36:00", "12:35:00 +00", "12:35:00 +01", "13:35:00 +01", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +01"]', '["12:34:00", "12:35:00", "12:36:00", "12:35:00 +00", "12:35:00 +01", "13:35:00 +01", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +01"]',
'$[*].datetime() ? (@ >= "12:35".datetime("HH24:MI"))'); '$[*].datetime() ? (@ >= "12:35".datetime("HH24:MI"))');
ERROR: cannot convert value from time to timetz without timezone usage ERROR: cannot convert value from time to timetz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query( select jsonb_path_query(
'["12:34:00", "12:35:00", "12:36:00", "12:35:00 +00", "12:35:00 +01", "13:35:00 +01", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +01"]', '["12:34:00", "12:35:00", "12:36:00", "12:35:00 +00", "12:35:00 +01", "13:35:00 +01", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +01"]',
'$[*].datetime() ? (@ < "12:35".datetime("HH24:MI"))'); '$[*].datetime() ? (@ < "12:35".datetime("HH24:MI"))');
ERROR: cannot convert value from time to timetz without timezone usage ERROR: cannot convert value from time to timetz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query_tz( select jsonb_path_query_tz(
'["12:34:00", "12:35:00", "12:36:00", "12:35:00 +00", "12:35:00 +01", "13:35:00 +01", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +01"]', '["12:34:00", "12:35:00", "12:36:00", "12:35:00 +00", "12:35:00 +01", "13:35:00 +01", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +01"]',
'$[*].datetime() ? (@ == "12:35".datetime("HH24:MI"))'); '$[*].datetime() ? (@ == "12:35".datetime("HH24:MI"))');
@ -2034,18 +2034,18 @@ select jsonb_path_query_tz(
select jsonb_path_query( select jsonb_path_query(
'["12:34:00 +01", "12:35:00 +01", "12:36:00 +01", "12:35:00 +02", "12:35:00 -02", "10:35:00", "11:35:00", "12:35:00", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +1"]', '["12:34:00 +01", "12:35:00 +01", "12:36:00 +01", "12:35:00 +02", "12:35:00 -02", "10:35:00", "11:35:00", "12:35:00", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +1"]',
'$[*].datetime() ? (@ == "12:35 +1".datetime("HH24:MI TZH"))'); '$[*].datetime() ? (@ == "12:35 +1".datetime("HH24:MI TZH"))');
ERROR: cannot convert value from time to timetz without timezone usage ERROR: cannot convert value from time to timetz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query( select jsonb_path_query(
'["12:34:00 +01", "12:35:00 +01", "12:36:00 +01", "12:35:00 +02", "12:35:00 -02", "10:35:00", "11:35:00", "12:35:00", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +1"]', '["12:34:00 +01", "12:35:00 +01", "12:36:00 +01", "12:35:00 +02", "12:35:00 -02", "10:35:00", "11:35:00", "12:35:00", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +1"]',
'$[*].datetime() ? (@ >= "12:35 +1".datetime("HH24:MI TZH"))'); '$[*].datetime() ? (@ >= "12:35 +1".datetime("HH24:MI TZH"))');
ERROR: cannot convert value from time to timetz without timezone usage ERROR: cannot convert value from time to timetz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query( select jsonb_path_query(
'["12:34:00 +01", "12:35:00 +01", "12:36:00 +01", "12:35:00 +02", "12:35:00 -02", "10:35:00", "11:35:00", "12:35:00", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +1"]', '["12:34:00 +01", "12:35:00 +01", "12:36:00 +01", "12:35:00 +02", "12:35:00 -02", "10:35:00", "11:35:00", "12:35:00", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +1"]',
'$[*].datetime() ? (@ < "12:35 +1".datetime("HH24:MI TZH"))'); '$[*].datetime() ? (@ < "12:35 +1".datetime("HH24:MI TZH"))');
ERROR: cannot convert value from time to timetz without timezone usage ERROR: cannot convert value from time to timetz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query_tz( select jsonb_path_query_tz(
'["12:34:00 +01", "12:35:00 +01", "12:36:00 +01", "12:35:00 +02", "12:35:00 -02", "10:35:00", "11:35:00", "12:35:00", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +1"]', '["12:34:00 +01", "12:35:00 +01", "12:36:00 +01", "12:35:00 +02", "12:35:00 -02", "10:35:00", "11:35:00", "12:35:00", "2017-03-10", "2017-03-10 12:35:00", "2017-03-10 12:35:00 +1"]',
'$[*].datetime() ? (@ == "12:35 +1".datetime("HH24:MI TZH"))'); '$[*].datetime() ? (@ == "12:35 +1".datetime("HH24:MI TZH"))');
@ -2080,18 +2080,18 @@ select jsonb_path_query_tz(
select jsonb_path_query( select jsonb_path_query(
'["2017-03-10 12:34:00", "2017-03-10 12:35:00", "2017-03-10 12:36:00", "2017-03-10 12:35:00 +01", "2017-03-10 13:35:00 +01", "2017-03-10 12:35:00 -01", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]', '["2017-03-10 12:34:00", "2017-03-10 12:35:00", "2017-03-10 12:36:00", "2017-03-10 12:35:00 +01", "2017-03-10 13:35:00 +01", "2017-03-10 12:35:00 -01", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]',
'$[*].datetime() ? (@ == "10.03.2017 12:35".datetime("dd.mm.yyyy HH24:MI"))'); '$[*].datetime() ? (@ == "10.03.2017 12:35".datetime("dd.mm.yyyy HH24:MI"))');
ERROR: cannot convert value from timestamp to timestamptz without timezone usage ERROR: cannot convert value from timestamp to timestamptz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query( select jsonb_path_query(
'["2017-03-10 12:34:00", "2017-03-10 12:35:00", "2017-03-10 12:36:00", "2017-03-10 12:35:00 +01", "2017-03-10 13:35:00 +01", "2017-03-10 12:35:00 -01", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]', '["2017-03-10 12:34:00", "2017-03-10 12:35:00", "2017-03-10 12:36:00", "2017-03-10 12:35:00 +01", "2017-03-10 13:35:00 +01", "2017-03-10 12:35:00 -01", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]',
'$[*].datetime() ? (@ >= "10.03.2017 12:35".datetime("dd.mm.yyyy HH24:MI"))'); '$[*].datetime() ? (@ >= "10.03.2017 12:35".datetime("dd.mm.yyyy HH24:MI"))');
ERROR: cannot convert value from timestamp to timestamptz without timezone usage ERROR: cannot convert value from timestamp to timestamptz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query( select jsonb_path_query(
'["2017-03-10 12:34:00", "2017-03-10 12:35:00", "2017-03-10 12:36:00", "2017-03-10 12:35:00 +01", "2017-03-10 13:35:00 +01", "2017-03-10 12:35:00 -01", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]', '["2017-03-10 12:34:00", "2017-03-10 12:35:00", "2017-03-10 12:36:00", "2017-03-10 12:35:00 +01", "2017-03-10 13:35:00 +01", "2017-03-10 12:35:00 -01", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]',
'$[*].datetime() ? (@ < "10.03.2017 12:35".datetime("dd.mm.yyyy HH24:MI"))'); '$[*].datetime() ? (@ < "10.03.2017 12:35".datetime("dd.mm.yyyy HH24:MI"))');
ERROR: cannot convert value from timestamp to timestamptz without timezone usage ERROR: cannot convert value from timestamp to timestamptz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query_tz( select jsonb_path_query_tz(
'["2017-03-10 12:34:00", "2017-03-10 12:35:00", "2017-03-10 12:36:00", "2017-03-10 12:35:00 +01", "2017-03-10 13:35:00 +01", "2017-03-10 12:35:00 -01", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]', '["2017-03-10 12:34:00", "2017-03-10 12:35:00", "2017-03-10 12:36:00", "2017-03-10 12:35:00 +01", "2017-03-10 13:35:00 +01", "2017-03-10 12:35:00 -01", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]',
'$[*].datetime() ? (@ == "10.03.2017 12:35".datetime("dd.mm.yyyy HH24:MI"))'); '$[*].datetime() ? (@ == "10.03.2017 12:35".datetime("dd.mm.yyyy HH24:MI"))');
@ -2127,18 +2127,18 @@ select jsonb_path_query_tz(
select jsonb_path_query( select jsonb_path_query(
'["2017-03-10 12:34:00 +01", "2017-03-10 12:35:00 +01", "2017-03-10 12:36:00 +01", "2017-03-10 12:35:00 +02", "2017-03-10 12:35:00 -02", "2017-03-10 10:35:00", "2017-03-10 11:35:00", "2017-03-10 12:35:00", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]', '["2017-03-10 12:34:00 +01", "2017-03-10 12:35:00 +01", "2017-03-10 12:36:00 +01", "2017-03-10 12:35:00 +02", "2017-03-10 12:35:00 -02", "2017-03-10 10:35:00", "2017-03-10 11:35:00", "2017-03-10 12:35:00", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]',
'$[*].datetime() ? (@ == "10.03.2017 12:35 +1".datetime("dd.mm.yyyy HH24:MI TZH"))'); '$[*].datetime() ? (@ == "10.03.2017 12:35 +1".datetime("dd.mm.yyyy HH24:MI TZH"))');
ERROR: cannot convert value from timestamp to timestamptz without timezone usage ERROR: cannot convert value from timestamp to timestamptz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query( select jsonb_path_query(
'["2017-03-10 12:34:00 +01", "2017-03-10 12:35:00 +01", "2017-03-10 12:36:00 +01", "2017-03-10 12:35:00 +02", "2017-03-10 12:35:00 -02", "2017-03-10 10:35:00", "2017-03-10 11:35:00", "2017-03-10 12:35:00", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]', '["2017-03-10 12:34:00 +01", "2017-03-10 12:35:00 +01", "2017-03-10 12:36:00 +01", "2017-03-10 12:35:00 +02", "2017-03-10 12:35:00 -02", "2017-03-10 10:35:00", "2017-03-10 11:35:00", "2017-03-10 12:35:00", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]',
'$[*].datetime() ? (@ >= "10.03.2017 12:35 +1".datetime("dd.mm.yyyy HH24:MI TZH"))'); '$[*].datetime() ? (@ >= "10.03.2017 12:35 +1".datetime("dd.mm.yyyy HH24:MI TZH"))');
ERROR: cannot convert value from timestamp to timestamptz without timezone usage ERROR: cannot convert value from timestamp to timestamptz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query( select jsonb_path_query(
'["2017-03-10 12:34:00 +01", "2017-03-10 12:35:00 +01", "2017-03-10 12:36:00 +01", "2017-03-10 12:35:00 +02", "2017-03-10 12:35:00 -02", "2017-03-10 10:35:00", "2017-03-10 11:35:00", "2017-03-10 12:35:00", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]', '["2017-03-10 12:34:00 +01", "2017-03-10 12:35:00 +01", "2017-03-10 12:36:00 +01", "2017-03-10 12:35:00 +02", "2017-03-10 12:35:00 -02", "2017-03-10 10:35:00", "2017-03-10 11:35:00", "2017-03-10 12:35:00", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]',
'$[*].datetime() ? (@ < "10.03.2017 12:35 +1".datetime("dd.mm.yyyy HH24:MI TZH"))'); '$[*].datetime() ? (@ < "10.03.2017 12:35 +1".datetime("dd.mm.yyyy HH24:MI TZH"))');
ERROR: cannot convert value from timestamp to timestamptz without timezone usage ERROR: cannot convert value from timestamp to timestamptz without time zone usage
HINT: Use *_tz() function for timezone support. HINT: Use *_tz() function for time zone support.
select jsonb_path_query_tz( select jsonb_path_query_tz(
'["2017-03-10 12:34:00 +01", "2017-03-10 12:35:00 +01", "2017-03-10 12:36:00 +01", "2017-03-10 12:35:00 +02", "2017-03-10 12:35:00 -02", "2017-03-10 10:35:00", "2017-03-10 11:35:00", "2017-03-10 12:35:00", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]', '["2017-03-10 12:34:00 +01", "2017-03-10 12:35:00 +01", "2017-03-10 12:36:00 +01", "2017-03-10 12:35:00 +02", "2017-03-10 12:35:00 -02", "2017-03-10 10:35:00", "2017-03-10 11:35:00", "2017-03-10 12:35:00", "2017-03-10", "2017-03-11", "12:34:56", "12:34:56 +01"]',
'$[*].datetime() ? (@ == "10.03.2017 12:35 +1".datetime("dd.mm.yyyy HH24:MI TZH"))'); '$[*].datetime() ? (@ == "10.03.2017 12:35 +1".datetime("dd.mm.yyyy HH24:MI TZH"))');

View File

@ -623,7 +623,7 @@ SELECT thousand
SELECT ''::text AS two, unique1, unique2, stringu1 SELECT ''::text AS two, unique1, unique2, stringu1
FROM onek WHERE unique1 > 50 FROM onek WHERE unique1 > 50
FETCH FIRST 2 ROW WITH TIES; FETCH FIRST 2 ROW WITH TIES;
ERROR: WITH TIES options can not be specified without ORDER BY clause ERROR: WITH TIES cannot be specified without ORDER BY clause
-- test ruleutils -- test ruleutils
CREATE VIEW limit_thousand_v_1 AS SELECT thousand FROM onek WHERE thousand < 995 CREATE VIEW limit_thousand_v_1 AS SELECT thousand FROM onek WHERE thousand < 995
ORDER BY thousand FETCH FIRST 5 ROWS WITH TIES OFFSET 10; ORDER BY thousand FETCH FIRST 5 ROWS WITH TIES OFFSET 10;
@ -657,7 +657,7 @@ View definition:
CREATE VIEW limit_thousand_v_3 AS SELECT thousand FROM onek WHERE thousand < 995 CREATE VIEW limit_thousand_v_3 AS SELECT thousand FROM onek WHERE thousand < 995
ORDER BY thousand FETCH FIRST NULL ROWS WITH TIES; -- fails ORDER BY thousand FETCH FIRST NULL ROWS WITH TIES; -- fails
ERROR: row count cannot be NULL in FETCH FIRST ... WITH TIES clause ERROR: row count cannot be null in FETCH FIRST ... WITH TIES clause
CREATE VIEW limit_thousand_v_3 AS SELECT thousand FROM onek WHERE thousand < 995 CREATE VIEW limit_thousand_v_3 AS SELECT thousand FROM onek WHERE thousand < 995
ORDER BY thousand FETCH FIRST (NULL+1) ROWS WITH TIES; ORDER BY thousand FETCH FIRST (NULL+1) ROWS WITH TIES;
\d+ limit_thousand_v_3 \d+ limit_thousand_v_3