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

Commita3d6264

Browse files
committed
interval_out() must be marked STABLE, not IMMUTABLE.
Its results vary depending on the IntervalStyle GUC, so it cannotbe considered immutable.This is an extremely ancient bug. AFAICT it was a sloppy mistakein6f58115, which marked it "cacheable" alongside marking severalother interval functions that way. At the time, interval_out()depended on DateStyle not IntervalStyle, but it was still wrong.Back-patching this change doesn't look very practical, so I won't.Aside from the usual difficulties of getting catalog changesapplied to existing databases, people might have indexes,generated columns, etc that depend on interval-to-text castsbeing considered immutable. (This'd not really give them anyproblem as long as they never change IntervalStyle.) Theywouldn't appreciate us breaking such usage in minor releases.Per bug #17371 from Marcus Gartner.Discussion:https://postgr.es/m/17371-8f57e6e9ca5e35bf@postgresql.org
1 parent6c4a890 commita3d6264

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎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_NO202201171
56+
#defineCATALOG_VERSION_NO202201191
5757

5858
#endif

‎src/include/catalog/pg_proc.dat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2290,8 +2290,8 @@
22902290
proname => 'interval_in', provolatile => 's', prorettype => 'interval',
22912291
proargtypes => 'cstring oid int4', prosrc => 'interval_in' },
22922292
{ oid => '1161', descr => 'I/O',
2293-
proname => 'interval_out',prorettype => 'cstring',proargtypes => 'interval',
2294-
prosrc => 'interval_out' },
2293+
proname => 'interval_out',provolatile => 's',prorettype => 'cstring',
2294+
proargtypes => 'interval',prosrc => 'interval_out' },
22952295
{ oid => '2903', descr => 'I/O typmod',
22962296
proname => 'intervaltypmodin', prorettype => 'int4',
22972297
proargtypes => '_cstring', prosrc => 'intervaltypmodin' },

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp