You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<
8000
script type="application/json" data-target="react-app.embeddedData">{"payload":{"commit":{"oid":"adc3ae6eb313360800b4b97d3557a175269a240e","url":"/postgres/postgres/commit/adc3ae6eb313360800b4b97d3557a175269a240e","authoredDate":"2022-08-01T12:22:35.000-04:00","committedDate":"2022-08-01T12:22:35.000-04:00","shortMessage":null,"shortMessageMarkdown":"\u003cdiv\u003eCheck maximum number of columns in function RTEs, too.\u003c/div\u003e","shortMessageMarkdownLink":null,"bodyMessageHtml":"I thought commit \u003ca class=\"commit-link\" data-hovercard-type=\"commit\" data-hovercard-url=\"https://github.com/postgres/postgres/commit/fd96d14d950f2b1d19b5cb3b8e5a7d4d2b3fa161/hovercard\" href=\"https://github.com/postgres/postgres/commit/fd96d14d950f2b1d19b5cb3b8e5a7d4d2b3fa161\"\u003e\u003ctt\u003efd96d14\u003c/tt\u003e\u003c/a\u003e had plugged all the holes of this sort,\nbut no, function RTEs could produce oversize tuples too, either\nvia long coldeflists or just from multiple functions in one RTE.\n(I'm pretty sure the other variants of base RTEs aren't a problem,\nbecause they ultimately refer to either a table or a sub-SELECT,\nwhose widths are enforced elsewhere. But we explicitly allow join\nRTEs to be overwidth, as long as you don't try to form their\ntuple result.)\n\nPer further discussion of bug #17561. As before, patch all branches.\n\nDiscussion: \u003ca href=\"https://postgr.es/m/17561-80350151b9ad2ad4@postgresql.org\" rel=\"nofollow\"\u003ehttps://postgr.es/m/17561-80350151b9ad2ad4@postgresql.org\u003c/a\u003e","authors":[{"login":"tglsfdc","displayName":"Tom Lane","avatarUrl":"https://avatars.githubusercontent.com/u/8755309?v=4","path":"/tglsfdc","isGitHub":false}],"committerAttribution":false,"committer":{"login":"tglsfdc","displayName":"Tom Lane","avatarUrl":"https://avatars.githubusercontent.com/u/8755309?v=4","path":"/tglsfdc","isGitHub":false},"parents":["07abcd9ab712b843568e2f9a00006dd25797dc02"],"globalRelayId":"C_kwDOAA4m0toAKGFkYzNhZTZlYjMxMzM2MDgwMGI0Yjk3ZDM1NTdhMTc1MjY5YTI0MGU","sha1":"07abcd9ab712b843568e2f9a00006dd25797dc02","sha2":"adc3ae6eb313360800b4b97d3557a175269a240e"},"currentUser":null,"repo":{"id":927442,"defaultBranch":"master","name":"postgres","ownerLogin":"postgres","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2010-09-21T11:35:45.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/177543?v=4","public":true,"private":false,"isOrgOwned":true},"diffEntryData":[{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":1829,"text":"@@ -1830,8 +1830,16 @@ addRangeTableEntryForFunction(ParseState *pstate,","html":"@@ -1830,8 +1830,16 @@ addRangeTableEntryForFunction(ParseState *pstate,","displayNoNewLineWarning":false,"position":0,"left":1829,"right":1829},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1830,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":1,"left":1830,"right":1830},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1831,"text":" \t\t\t/*","html":" \t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":2,"left":1831,"right":1831},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1832,"text":" \t\t\t * Use the column definition list to construct a tupdesc and fill","html":" \u003cspan class=pl-c\u003e\t\t\t * Use the column definition list to construct a tupdesc and fill\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":1832,"right":1832},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1833,"text":"-\t\t\t * in the RangeTblFunction's lists.","html":"-\u003cspan class=pl-c\u003e\t\t\t * in the RangeTblFunction\u0026#39;s lists.\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":1833,"right":1832},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1833,"text":"+\t\t\t * in the RangeTblFunction's lists. Limit number of columns to","html":"+\u003cspan class=pl-c\u003e\t\t\t * in the RangeTblFunction\u0026#39;s lists. Limit number of columns to\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":1833,"right":1833},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1834,"text":"+\t\t\t * MaxHeapAttributeNumber, because CheckAttributeNamesTypes will.","html":"+\u003cspan class=pl-c\u003e\t\t\t * MaxHeapAttributeNumber, because CheckAttributeNamesTypes will.\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":1833,"right":1834},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1835,"text":" \t\t\t */","html":" \u003cspan class=pl-c\u003e\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":1834,"right":1835},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1836,"text":"+\t\t\tif (list_length(coldeflist) \u003e MaxHeapAttributeNumber)","html":"+\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003elist_length\u003c/span\u003e(\u003cspan class=pl-s1\u003ecoldeflist\u003c/span\u003e) \u003cspan class=pl-c1\u003e\u0026gt;\u003c/span\u003e \u003cspan class=pl-s1\u003eMaxHeapAttributeNumber\u003c/span\u003e)","displayNoNewLineWarning":false,"position":8,"left":1834,"right":1836},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1837,"text":"+\t\t\t\tereport(ERROR,","html":"+\t\t\t\t\u003cspan class=pl-en\u003eereport\u003c/span\u003e(\u003cspan class=pl-c1\u003eERROR\u003c/span\u003e,","displayNoNewLineWarning":false,"position":9,"left":1834,"right":1837},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1838,"text":"+\t\t\t\t\t\t(errcode(ERRCODE_TOO_MANY_COLUMNS),","html":"+\t\t\t\t\t\t(\u003cspan class=pl-en\u003eerrcode\u003c/span\u003e(\u003cspan class=pl-c1\u003eERRCODE_TOO_MANY_COLUMNS\u003c/span\u003e),","displayNoNewLineWarning":false,"position":10,"left":1834,"right":1838},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1839,"text":"+\t\t\t\t\t\t errmsg(\"column definition lists can have at most %d entries\",","html":"+\t\t\t\t\t\t \u003cspan class=pl-en\u003eerrmsg\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;column definition lists can have at most %d entries\u0026quot;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":11,"left":1834,"right":1839},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1840,"text":"+\t\t\t\t\t\t\t\tMaxHeapAttributeNumber),","html":"+\t\t\t\t\t\t\t\t\u003cspan class=pl-s1\u003eMaxHeapAttributeNumber\u003c/span\u003e),","displayNoNewLineWarning":false,"position":12,"left":1834,"right":1840},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1841,"text":"+\t\t\t\t\t\t parser_errposition(pstate,","html":"+\t\t\t\t\t\t \u003cspan class=pl-en\u003eparser_errposition\u003c/span\u003e(\u003cspan class=pl-s1\u003epstate\u003c/span\u003e,","displayNoNewLineWarning":false,"position":13,"left":1834,"right":1841},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1842,"text":"+\t\t\t\t\t\t\t\t\t\t\texprLocation((Node *) coldeflist))));","html":"+\t\t\t\t\t\t\t\t\t\t\t\u003cspan class=pl-en\u003eexprLocation\u003c/span\u003e((\u003cspan class=pl-smi\u003eNode\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e) \u003cspan class=pl-s1\u003ecoldeflist\u003c/span\u003e))));","displayNoNewLineWarning":false,"position":14,"left":1834,"right":1842},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1843,"text":" \t\t\ttupdesc = CreateTemplateTupleDesc(list_length(coldeflist));","html":" \t\t\t\u003cspan class=pl-s1\u003etupdesc\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eCreateTemplateTupleDesc\u003c/span\u003e(\u003cspan class=pl-en\u003elist_length\u003c/span\u003e(\u003cspan class=pl-s1\u003ecoldeflist\u003c/span\u003e));","displayNoNewLineWarning":false,"position":15,"left":1835,"right":1843},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1844,"text":" \t\t\ti = 1;","html":" \t\t\t\u003cspan class=pl-s1\u003ei\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e;","displayNoNewLineWarning":false,"position":16,"left":1836,"right":1844},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1845,"text":" \t\t\tforeach(col, coldeflist)","html":" \t\t\t\u003cspan class=pl-en\u003eforeach\u003c/span\u003e(\u003cspan class=pl-s1\u003ecol\u003c/span\u003e, \u003cspan class=pl-s1\u003ecoldeflist\u003c/span\u003e)","displayNoNewLineWarning":false,"position":17,"left":1837,"right":1845},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1918,"text":"@@ -1911,6 +1919,15 @@ addRangeTableEntryForFunction(ParseState *pstate,","html":"@@ -1911,6 +1919,15 @@ addRangeTableEntryForFunction(ParseState *pstate,","displayNoNewLineWarning":false,"position":18,"left":1910,"right":1918},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1919,"text":" \t\tif (rangefunc-\u003eordinality)","html":" \t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003erangefunc\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eordinality\u003c/span\u003e)","displayNoNewLineWarning":false,"position":19,"left":1911,"right":1919},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1920,"text":" \t\t\ttotalatts++;","html":" \t\t\t\u003cspan class=pl-s1\u003etotalatts\u003c/span\u003e\u003cspan class=pl-c1\u003e++\u003c/span\u003e;","displayNoNewLineWarning":false,"position":20,"left":1912,"right":1920},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1921,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":21,"left":1913,"right":1921},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1922,"text":"+\t\t/* Disallow more columns than will fit in a tuple */","html":"+\t\t\u003cspan class=pl-c\u003e/* Disallow more columns than will fit in a tuple */\u003c/span\u003e","displayNoNewLineWarning":false,"position":22,"left":1913,"right":1922},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1923,"text":"+\t\tif (totalatts \u003e MaxTupleAttributeNumber)","html":"+\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003etotalatts\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026gt;\u003c/span\u003e \u003cspan class=pl-s1\u003eMaxTupleAttributeNumber\u003c/span\u003e)","displayNoNewLineWarning":false,"position":23,"left":1913,"right":1923},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1924,"text":"+\t\t\tereport(ERROR,","html":"+\t\t\t\u003cspan class=pl-en\u003eereport\u003c/span\u003e(\u003cspan class=pl-c1\u003eERROR\u003c/span\u003e,","displayNoNewLineWarning":false,"position":24,"left":1913,"right":1924},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1925,"text":"+\t\t\t\t\t(errcode(ERRCODE_TOO_MANY_COLUMNS),","html":"+\t\t\t\t\t(\u003cspan class=pl-en\u003eerrcode\u003c/span\u003e(\u003cspan class=pl-c1\u003eERRCODE_TOO_MANY_COLUMNS\u003c/span\u003e),","displayNoNewLineWarning":false,"position":25,"left":1913,"right":1925},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1926,"text":"+\t\t\t\t\t errmsg(\"functions in FROM can return at most %d columns\",","html":"+\t\t\t\t\t \u003cspan class=pl-en\u003eerrmsg\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;functions in FROM can return at most %d columns\u0026quot;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":26,"left":1913,"right":1926},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1927,"text":"+\t\t\t\t\t\t\tMaxTupleAttributeNumber),","html":"+\t\t\t\t\t\t\t\u003cspan class=pl-s1\u003eMaxTupleAttributeNumber\u003c/span\u003e),","displayNoNewLineWarning":false,"position":27,"left":1913,"right":1927},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1928,"text":"+\t\t\t\t\t parser_errposition(pstate,","html":"+\t\t\t\t\t \u003cspan class=pl-en\u003eparser_errposition\u003c/span\u003e(\u003cspan class=pl-s1\u003epstate\u003c/span\u003e,","displayNoNewLineWarning":false,"position":28,"left":1913,"right":1928},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1929,"text":"+\t\t\t\t\t\t\t\t\t\texprLocation((Node *) funcexprs))));","html":"+\t\t\t\t\t\t\t\t\t\t\u003cspan class=pl-en\u003eexprLocation\u003c/span\u003e((\u003cspan class=pl-smi\u003eNode\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e) \u003cspan class=pl-s1\u003efuncexprs\u003c/span\u003e))));","displayNoNewLineWarning":false,"position":29,"left":1913,"right":1929},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1930,"text":"+","html":"+","displayNoNewLineWarning":false,"position":30,"left":1913,"right":1930},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1931,"text":" \t\t/* Merge the tuple descs of each function into a composite one */","html":" \t\t\u003cspan class=pl-c\u003e/* Merge the tuple descs of each function into a composite one */\u003c/span\u003e","displayNoNewLineWarning":false,"position":31,"left":1914,"right":1931},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1932,"text":" \t\ttupdesc = CreateTemplateTupleDesc(totalatts);","html":" \t\t\u003cspan class=pl-s1\u003etupdesc\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eCreateTemplateTupleDesc\u003c/span\u003e(\u003cspan class=pl-s1\u003etotalatts\u003c/span\u003e);","displayNoNewLineWarning":false,"position":32,"left":1915,"right":1932},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1933,"text":" \t\tnatts = 0;","html":" \t\t\u003cspan class=pl-s1\u003enatts\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":33,"left":1916,"right":1933},{"stylingDirective":null,"type":"HUNK","blobLineNumber":2009,"text":"@@ -1993,11 +2010,23 @@ addRangeTableEntryForTableFunc(ParseState *pstate,","html":"@@ -1993,11 +2010,23 @@ addRangeTableEntryForTableFunc(ParseState *pstate,","displayNoNewLineWarning":false,"position":34,"left":1992,"right":2009},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2010,"text":" \tAlias\t *eref;","html":" \t\u003cspan class=pl-smi\u003eAlias\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eeref\u003c/span\u003e;","displayNoNewLineWarning":false,"position":35,"left":1993,"right":2010},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2011,"text":" \tint\t\t\tnumaliases;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003enumaliases\u003c/span\u003e;","displayNoNewLineWarning":false,"position":36,"left":1994,"right":2011},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2012,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":37,"left":1995,"right":2012},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2013,"text":"+\tAssert(pstate != NULL);","html":"+\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003epstate\u003c/span\u003e \u003cspan class=pl-c1\u003e!=\u003c/span\u003e \u003cspan class=pl-c1\u003eNULL\u003c/span\u003e);","displayNoNewLineWarning":false,"position":38,"left":1995,"right":2013},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2014,"text":"+","html":"+","displayNoNewLineWarning":false,"position":39,"left":1995,"right":2014},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2015,"text":"+\t/* Disallow more columns than will fit in a tuple */","html":"+\t\u003cspan class=pl-c\u003e/* Disallow more columns than will fit in a tuple */\u003c/span\u003e","displayNoNewLineWarning":false,"position":40,"left":1995,"right":2015},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2016,"text":"+\tif (list_length(tf-\u003ecolnames) \u003e MaxTupleAttributeNumber)","html":"+\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003elist_length\u003c/span\u003e(\u003cspan class=pl-s1\u003etf\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ecolnames\u003c/span\u003e) \u003cspan class=pl-c1\u003e\u0026gt;\u003c/span\u003e \u003cspan class=pl-s1\u003eMaxTupleAttributeNumber\u003c/span\u003e)","displayNoNewLineWarning":false,"position":41,"left":1995,"right":2016},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2017,"text":"+\t\tereport(ERROR,","html":"+\t\t\u003cspan class=pl-en\u003eereport\u003c/span\u003e(\u003cspan class=pl-c1\u003eERROR\u003c/span\u003e,","displayNoNewLineWarning":false,"position":42,"left":1995,"right":2017},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2018,"text":"+\t\t\t\t(errcode(ERRCODE_TOO_MANY_COLUMNS),","html":"+\t\t\t\t(\u003cspan class=pl-en\u003eerrcode\u003c/span\u003e(\u003cspan class=pl-c1\u003eERRCODE_TOO_MANY_COLUMNS\u003c/span\u003e),","displayNoNewLineWarning":false,"position":43,"left":1995,"right":2018},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2019,"text":"+\t\t\t\t errmsg(\"functions in FROM can return at most %d columns\",","html":"+\t\t\t\t \u003cspan class=pl-en\u003eerrmsg\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;functions in FROM can return at most %d columns\u0026quot;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":44,"left":1995,"right":2019},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2020,"text":"+\t\t\t\t\t\tMaxTupleAttributeNumber),","html":"+\t\t\t\t\t\t\u003cspan class=pl-s1\u003eMaxTupleAttributeNumber\u003c/span\u003e),","displayNoNewLineWarning":false,"position":45,"left":1995,"right":2020},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2021,"text":"+\t\t\t\t parser_errposition(pstate,","html":"+\t\t\t\t \u003cspan class=pl-en\u003eparser_errposition\u003c/span\u003e(\u003cspan class=pl-s1\u003epstate\u003c/span\u003e,","displayNoNewLineWarning":false,"position":46,"left":1995,"right":2021},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2022,"text":"+\t\t\t\t\t\t\t\t\texprLocation((Node *) tf))));","html":"+\t\t\t\t\t\t\t\t\t\u003cspan class=pl-en\u003eexprLocation\u003c/span\u003e((\u003cspan class=pl-smi\u003eNode\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e) \u003cspan class=pl-s1\u003etf\u003c/span\u003e))));","displayNoNewLineWarning":false,"position":47,"left":1995,"right":2022},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2023,"text":"+\tAssert(list_length(tf-\u003ecoltypes) == list_length(tf-\u003ecolnames));","html":"+\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-en\u003elist_length\u003c/span\u003e(\u003cspan class=pl-s1\u003etf\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ecoltypes\u003c/span\u003e) \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-en\u003elist_length\u003c/span\u003e(\u003cspan class=pl-s1\u003etf\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ecolnames\u003c/span\u003e));","displayNoNewLineWarning":false,"position":48,"left":1995,"right":2023},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2024,"text":"+\tAssert(list_length(tf-\u003ecoltypmods) == list_length(tf-\u003ecolnames));","html":"+\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-en\u003elist_length\u003c/span\u003e(\u003cspan class=pl-s1\u003etf\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ecoltypmods\u003c/span\u003e) \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-en\u003elist_length\u003c/span\u003e(\u003cspan class=pl-s1\u003etf\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ecolnames\u003c/span\u003e));","displayNoNewLineWarning":false,"position":49,"left":1995,"right":2024},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2025,"text":"+\tAssert(list_length(tf-\u003ecolcollations) == list_length(tf-\u003ecolnames));","html":"+\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-en\u003elist_length\u003c/span\u003e(\u003cspan class=pl-s1\u003etf\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ecolcollations\u003c/span\u003e) \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-en\u003elist_length\u003c/span\u003e(\u003cspan class=pl-s1\u003etf\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ecolnames\u003c/span\u003e));","displayNoNewLineWarning":false,"position":50,"left":1995,"right":2025},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2026,"text":"+","html":"+","displayNoNewLineWarning":false,"position":51,"left":1995,"right":2026},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2027,"text":" \trefname = alias ? alias-\u003ealiasname :","html":" \t\u003cspan class=pl-s1\u003erefname\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003ealias\u003c/span\u003e ? \u003cspan class=pl-s1\u003ealias\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ealiasname\u003c/span\u003e :","displayNoNewLineWarning":false,"position":52,"left":1996,"right":2027},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2028,"text":" \t\tpstrdup(tf-\u003efunctype == TFT_XMLTABLE ? \"xmltable\" : \"json_table\");","html":" \t\t\u003cspan class=pl-en\u003epstrdup\u003c/span\u003e(\u003cspan class=pl-s1\u003etf\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003efunctype\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003eTFT_XMLTABLE\u003c/span\u003e ? \u003cspan class=pl-s\u003e\u0026quot;xmltable\u0026quot;\u003c/span\u003e : \u003cspan class=pl-s\u003e\u0026quot;json_table\u0026quot;\u003c/span\u003e);","displayNoNewLineWarning":false,"position":53,"left":1997,"right":2028},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2029,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":54,"left":1998,"right":2029},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1999,"text":"-\tAssert(pstate != NULL);","html":"-\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003epstate\u003c/span\u003e \u003cspan class=pl-c1\u003e!=\u003c/span\u003e \u003cspan class=pl-c1\u003eNULL\u003c/span\u003e);","displayNoNewLineWarning":false,"position":55,"left":1999,"right":2029},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2000,"text":"-","html":"-","displayNoNewLineWarning":false,"position":56,"left":2000,"right":2029},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2030,"text":" \trte-\u003ertekind = RTE_TABLEFUNC;","html":" \t\u003cspan class=pl-s1\u003erte\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ertekind\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eRTE_TABLEFUNC\u003c/span\u003e;","displayNoNewLineWarning":false,"position":57,"left":2001,"right":2030},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2031,"text":" \trte-\u003erelid = InvalidOid;","html":" \t\u003cspan class=pl-s1\u003erte\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelid\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eInvalidOid\u003c/span\u003e;","displayNoNewLineWarning":false,"position":58,"left":2002,"right":2031},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2032,"text":" \trte-\u003esubquery = NULL;","html":" \t\u003cspan class=pl-s1\u003erte\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003esubquery\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eNULL\u003c/span\u003e;","displayNoNewLineWarning":false,"position":59,"left":2003,"right":2032}],"diffNumber":0,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":3730,"linesChanged":35,"newTreeEntry":{"lineCount":3730,"path":"src/backend/parser/parse_relation.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/parser/parse_relation.c","mode":100644},"linesAdded":32,"linesDeleted":3,"path":"src/backend/parser/parse_relation.c","pathDigest":"d35191b290e0e158e14a958e47730fb02e03f30c0153a608b13d90606b9d681b","status":"MODIFIED","truncatedReason":null,"oldOid":"07abcd9ab712b843568e2f9a00006dd25797dc02","newOid":"adc3ae6eb313360800b4b97d3557a175269a240e","copilotChatReference":null,"deletedSha":"07abcd9ab712b843568e2f9a00006dd25797dc02","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null}],"splitViewPreference":"unified","ignoreWhitespace":false,"repoOwnerGlobalRelayId":"MDEyOk9yZ2FuaXphdGlvbjE3NzU0Mw==","commentsPreference":"visible","diffLineSpacingPreference":"relaxed","useMonospaceFont":false,"pasteUrlLinkAsPlainText":false,"userNotices":[],"path":"/postgres/postgres/commit/adc3ae6eb313360800b4b97d3557a175269a240e","fileTreeExpanded":true,"headerInfo":{"additions":32,"deletions":3,"filesChanged":1,"filesChangedString":"1"},"moreDiffsToLoad":false,"asyncDiffLoadInfo":{"startIndex":1,"truncated":false,"byteCount":2264,"lineShownCount":60},"commentInfo":{"canComment":false,"locked":false,"canLock":false,"repoArchived":false},"csrf_tokens":{"/users/diffview?diff=split":{"post":"WuFJa2w8xZ56w6DxX4_AHBPOknT7pKsDjFqKrFSObjb1CtOFUR3-eA6AzH74nstjMiZdZ0yGLIn3i0N41w1q3w"},"/users/diffview?diff=unified":{"post":"_dfizOvgL1H-PUsBA89nQVXAuR3Ffc4g1rGU4RVcd8dSPHgi1sEUt4p-J46k3mw-dCh2DnJfSaqtYF01lt9zLg"},"/notifications/thread":{"post":"KPrvA21EA5JnnFor59ckNZMBRWcTcmiLp-Q0TZBMkGeZnq5H-ToF8SkrnAQKGzGStZtbIT9F3qmlv95409ogNA"}}},"title":"Check maximum number of columns in function RTEs, too. · postgres/postgres@adc3ae6","appPayload":{"helpUrl":"https://docs.github.com","findInDiffWorkerPath":"/assets-cdn/worker/find-in-diff-worker-2bfe39677d14.js","enabled_features":{"diff_ux_refresh_beta":false,"diff_inline_comments":true,"diff_ux_refresh_ssr_five":false,"diff_ux_refresh_ssr_ten":false,"react_diff_line_type_character_correction":true}}}
Check maximum number of columns in function RTEs, too.
I thought commit fd96d14 had plugged all the holes of this sort,
but no, function RTEs could produce oversize tuples too, either
via long coldeflists or just from multiple functions in one RTE.
(I'm pretty sure the other variants of base RTEs aren't a problem,
because they ultimately refer to either a table or a sub-SELECT,
whose widths are enforced elsewhere. But we explicitly allow join
RTEs to be overwidth, as long as you don't try to form their
tuple result.)
Per further discussion of bug #17561. As before, patch all branches.
Discussion: https://postgr.es/m/17561-80350151b9ad2ad4@postgresql.org
0 commit comments