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

Commit9cf184c

Browse files
committed
pg_collation_actual_version() -> pg_collation_current_version().
The new name seems a bit more natural.Discussion:https://postgr.es/m/20210117215940.GE8560%40telsasoft.com
1 parent0fb0a05 commit9cf184c

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26227,14 +26227,14 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
2622726227
<row>
2622826228
<entry role="func_table_entry"><para role="func_signature">
2622926229
<indexterm>
26230-
<primary>pg_collation_actual_version</primary>
26230+
<primary>pg_collation_current_version</primary>
2623126231
</indexterm>
26232-
<function>pg_collation_actual_version</function> ( <type>oid</type> )
26232+
<function>pg_collation_current_version</function> ( <type>oid</type> )
2623326233
<returnvalue>text</returnvalue>
2623426234
</para>
2623526235
<para>
26236-
Returns theactualversion of the collation object asit is currently
26237-
installed in the operating system. <literal>null</literal> is returned
26236+
Returns the version of the collation object asreported by the ICU
26237+
library or operating system. <literal>null</literal> is returned
2623826238
on operating systems where <productname>PostgreSQL</productname>
2623926239
doesn't have support for versions.
2624026240
</para></entry>

‎src/backend/commands/collationcmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ IsThereCollationInNamespace(const char *collname, Oid nspOid)
268268
}
269269

270270
Datum
271-
pg_collation_actual_version(PG_FUNCTION_ARGS)
271+
pg_collation_current_version(PG_FUNCTION_ARGS)
272272
{
273273
Oidcollid=PG_GETARG_OID(0);
274274
char*version;

‎src/backend/utils/adt/pg_locale.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ static char *IsoLocaleName(const char *);/* MSVC specific */
127127
staticvoidicu_set_collation_attributes(UCollator*collator,constchar*loc);
128128
#endif
129129

130-
staticchar*get_collation_actual_version(charcollprovider,
131-
constchar*collcollate);
130+
staticchar*get_collation_current_version(charcollprovider,
131+
constchar*collcollate);
132132

133133
/*
134134
* pg_perm_setlocale
@@ -1610,7 +1610,7 @@ pg_newlocale_from_collation(Oid collid)
16101610
* the operating system/library.
16111611
*/
16121612
staticchar*
1613-
get_collation_actual_version(charcollprovider,constchar*collcollate)
1613+
get_collation_current_version(charcollprovider,constchar*collcollate)
16141614
{
16151615
char*collversion=NULL;
16161616

@@ -1743,8 +1743,8 @@ get_collation_version_for_oid(Oid oid, bool missing_ok)
17431743
if (!HeapTupleIsValid(tp))
17441744
elog(ERROR,"cache lookup failed for database %u",MyDatabaseId);
17451745
dbform= (Form_pg_database)GETSTRUCT(tp);
1746-
version=get_collation_actual_version(COLLPROVIDER_LIBC,
1747-
NameStr(dbform->datcollate));
1746+
version=get_collation_current_version(COLLPROVIDER_LIBC,
1747+
NameStr(dbform->datcollate));
17481748
}
17491749
else
17501750
{
@@ -1758,8 +1758,8 @@ get_collation_version_for_oid(Oid oid, bool missing_ok)
17581758
elog(ERROR,"cache lookup failed for collation %u",oid);
17591759
}
17601760
collform= (Form_pg_collation)GETSTRUCT(tp);
1761-
version=get_collation_actual_version(collform->collprovider,
1762-
NameStr(collform->collcollate));
1761+
version=get_collation_current_version(collform->collprovider,
1762+
NameStr(collform->collcollate));
17631763
}
17641764

17651765
ReleaseSysCache(tp);

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO202102191
56+
#defineCATALOG_VERSION_NO202102221
5757

5858
#endif

‎src/include/catalog/pg_proc.dat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11321,9 +11321,9 @@
1132111321

1132211322
{ oid => '3448',
1132311323
descr => 'get actual version of collation from operating system',
11324-
proname => 'pg_collation_actual_version', procost => '100',
11324+
proname => 'pg_collation_current_version', procost => '100',
1132511325
provolatile => 'v', prorettype => 'text', proargtypes => 'oid',
11326-
prosrc => 'pg_collation_actual_version' },
11326+
prosrc => 'pg_collation_current_version' },
1132711327

1132811328
# system management/monitoring related functions
1132911329
{ oid => '3353', descr => 'list files in the log directory',

‎src/test/regress/expected/collate.icu.utf8.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,7 +2018,7 @@ SELECT objid::regclass::text collate "C", refobjid::regcollation::text collate "
20182018
CASE
20192019
WHEN refobjid = 'default'::regcollation THEN 'XXX' -- depends on libc version support
20202020
WHEN refobjversion IS NULL THEN 'version not tracked'
2021-
WHEN refobjversion =pg_collation_actual_version(refobjid) THEN 'up to date'
2021+
WHEN refobjversion =pg_collation_current_version(refobjid) THEN 'up to date'
20222022
ELSE 'out of date'
20232023
END AS version
20242024
FROM pg_depend d
@@ -2156,14 +2156,14 @@ RESET client_min_messages;
21562156
-- leave a collation for pg_upgrade test
21572157
CREATE COLLATION coll_icu_upgrade FROM "und-x-icu";
21582158
-- Test user-visible function for inspecting versions
2159-
SELECTpg_collation_actual_version('"en-x-icu"'::regcollation) is not null;
2159+
SELECTpg_collation_current_version('"en-x-icu"'::regcollation) is not null;
21602160
?column?
21612161
----------
21622162
t
21632163
(1 row)
21642164

21652165
-- Invalid OIDs are silently ignored
2166-
SELECTpg_collation_actual_version(0) is null;
2166+
SELECTpg_collation_current_version(0) is null;
21672167
?column?
21682168
----------
21692169
t

‎src/test/regress/sql/collate.icu.utf8.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ SELECT objid::regclass::text collate "C", refobjid::regcollation::text collate "
820820
CASE
821821
WHEN refobjid='default'::regcollation THEN'XXX'-- depends on libc version support
822822
WHEN refobjversion ISNULL THEN'version not tracked'
823-
WHEN refobjversion=pg_collation_actual_version(refobjid) THEN'up to date'
823+
WHEN refobjversion=pg_collation_current_version(refobjid) THEN'up to date'
824824
ELSE'out of date'
825825
ENDAS version
826826
FROM pg_depend d
@@ -885,6 +885,6 @@ RESET client_min_messages;
885885
CREATE COLLATION coll_icu_upgradeFROM"und-x-icu";
886886

887887
-- Test user-visible function for inspecting versions
888-
SELECTpg_collation_actual_version('"en-x-icu"'::regcollation)is not null;
888+
SELECTpg_collation_current_version('"en-x-icu"'::regcollation)is not null;
889889
-- Invalid OIDs are silently ignored
890-
SELECTpg_collation_actual_version(0) isnull;
890+
SELECTpg_collation_current_version(0) isnull;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp