pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix error reporting for index expressions of prohibited types. 7+ messages / 1 participants [nested] [flat]
* pgsql: Fix error reporting for index expressions of prohibited types. @ 2019-12-17 22:44 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2019-12-17 22:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix error reporting for index expressions of prohibited types. If CheckAttributeType() threw an error about the datatype of an index expression column, it would report an empty column name, which is pretty unhelpful and certainly not the intended behavior. I (tgl) evidently broke this in commit cfc5008a5, by not noticing that the column's attname was used above where I'd placed the assignment of it. In HEAD and v12, this is trivially fixable by moving up the assignment of attname. Before v12 the code is a bit more messy; to avoid doing substantial refactoring, I took the lazy way out and just put in two copies of the assignment code. Report and patch by Amit Langote. Back-patch to all supported branches. Discussion: https://postgr.es/m/CA+HiwqFA+BGyBFimjiYXXMa2Hc3fcL0+OJOyzUNjhU4NCa_XXw@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/2acab054b3ff8e46707727980ce3fa1a1897381f Modified Files -------------- src/backend/catalog/index.c | 17 +++++++------- src/test/regress/expected/create_index.out | 37 ++++++++++++++++++++++++++++++ src/test/regress/sql/create_index.sql | 12 ++++++++++ 3 files changed, 57 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix error reporting for index expressions of prohibited types. @ 2019-12-17 22:44 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2019-12-17 22:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix error reporting for index expressions of prohibited types. If CheckAttributeType() threw an error about the datatype of an index expression column, it would report an empty column name, which is pretty unhelpful and certainly not the intended behavior. I (tgl) evidently broke this in commit cfc5008a5, by not noticing that the column's attname was used above where I'd placed the assignment of it. In HEAD and v12, this is trivially fixable by moving up the assignment of attname. Before v12 the code is a bit more messy; to avoid doing substantial refactoring, I took the lazy way out and just put in two copies of the assignment code. Report and patch by Amit Langote. Back-patch to all supported branches. Discussion: https://postgr.es/m/CA+HiwqFA+BGyBFimjiYXXMa2Hc3fcL0+OJOyzUNjhU4NCa_XXw@mail.gmail.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/97ba30fab51a19e06ae1cf74abed3ce748b2fa95 Modified Files -------------- src/backend/catalog/index.c | 17 +++++++------- src/test/regress/expected/create_index.out | 37 ++++++++++++++++++++++++++++++ src/test/regress/sql/create_index.sql | 12 ++++++++++ 3 files changed, 57 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix error reporting for index expressions of prohibited types. @ 2019-12-17 22:44 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2019-12-17 22:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix error reporting for index expressions of prohibited types. If CheckAttributeType() threw an error about the datatype of an index expression column, it would report an empty column name, which is pretty unhelpful and certainly not the intended behavior. I (tgl) evidently broke this in commit cfc5008a5, by not noticing that the column's attname was used above where I'd placed the assignment of it. In HEAD and v12, this is trivially fixable by moving up the assignment of attname. Before v12 the code is a bit more messy; to avoid doing substantial refactoring, I took the lazy way out and just put in two copies of the assignment code. Report and patch by Amit Langote. Back-patch to all supported branches. Discussion: https://postgr.es/m/CA+HiwqFA+BGyBFimjiYXXMa2Hc3fcL0+OJOyzUNjhU4NCa_XXw@mail.gmail.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/fc449abc3dccc06b01783bcdb2c348c8ef670ccd Modified Files -------------- src/backend/catalog/index.c | 24 ++++++++++++------- src/test/regress/expected/create_index.out | 37 ++++++++++++++++++++++++++++++ src/test/regress/sql/create_index.sql | 12 ++++++++++ 3 files changed, 65 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix error reporting for index expressions of prohibited types. @ 2019-12-17 22:44 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2019-12-17 22:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix error reporting for index expressions of prohibited types. If CheckAttributeType() threw an error about the datatype of an index expression column, it would report an empty column name, which is pretty unhelpful and certainly not the intended behavior. I (tgl) evidently broke this in commit cfc5008a5, by not noticing that the column's attname was used above where I'd placed the assignment of it. In HEAD and v12, this is trivially fixable by moving up the assignment of attname. Before v12 the code is a bit more messy; to avoid doing substantial refactoring, I took the lazy way out and just put in two copies of the assignment code. Report and patch by Amit Langote. Back-patch to all supported branches. Discussion: https://postgr.es/m/CA+HiwqFA+BGyBFimjiYXXMa2Hc3fcL0+OJOyzUNjhU4NCa_XXw@mail.gmail.com Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5c5a268c605b9040206a3174667c20056d8e6603 Modified Files -------------- src/backend/catalog/index.c | 24 ++++++++++++------- src/test/regress/expected/create_index.out | 37 ++++++++++++++++++++++++++++++ src/test/regress/sql/create_index.sql | 12 ++++++++++ 3 files changed, 65 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix error reporting for index expressions of prohibited types. @ 2019-12-17 22:44 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2019-12-17 22:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix error reporting for index expressions of prohibited types. If CheckAttributeType() threw an error about the datatype of an index expression column, it would report an empty column name, which is pretty unhelpful and certainly not the intended behavior. I (tgl) evidently broke this in commit cfc5008a5, by not noticing that the column's attname was used above where I'd placed the assignment of it. In HEAD and v12, this is trivially fixable by moving up the assignment of attname. Before v12 the code is a bit more messy; to avoid doing substantial refactoring, I took the lazy way out and just put in two copies of the assignment code. Report and patch by Amit Langote. Back-patch to all supported branches. Discussion: https://postgr.es/m/CA+HiwqFA+BGyBFimjiYXXMa2Hc3fcL0+OJOyzUNjhU4NCa_XXw@mail.gmail.com Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/275a8ac4f75ccfa73e0baa7c71ad59f4fe89367c Modified Files -------------- src/backend/catalog/index.c | 24 ++++++++++++------- src/test/regress/expected/create_index.out | 37 ++++++++++++++++++++++++++++++ src/test/regress/sql/create_index.sql | 12 ++++++++++ 3 files changed, 65 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix error reporting for index expressions of prohibited types. @ 2019-12-17 22:44 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2019-12-17 22:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix error reporting for index expressions of prohibited types. If CheckAttributeType() threw an error about the datatype of an index expression column, it would report an empty column name, which is pretty unhelpful and certainly not the intended behavior. I (tgl) evidently broke this in commit cfc5008a5, by not noticing that the column's attname was used above where I'd placed the assignment of it. In HEAD and v12, this is trivially fixable by moving up the assignment of attname. Before v12 the code is a bit more messy; to avoid doing substantial refactoring, I took the lazy way out and just put in two copies of the assignment code. Report and patch by Amit Langote. Back-patch to all supported branches. Discussion: https://postgr.es/m/CA+HiwqFA+BGyBFimjiYXXMa2Hc3fcL0+OJOyzUNjhU4NCa_XXw@mail.gmail.com Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/da5dd421833b2cd074cb752dd8ecfbe6a4735a4f Modified Files -------------- src/backend/catalog/index.c | 24 ++++++++++++------- src/test/regress/expected/create_index.out | 37 ++++++++++++++++++++++++++++++ src/test/regress/sql/create_index.sql | 12 ++++++++++ 3 files changed, 65 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix error reporting for index expressions of prohibited types. @ 2019-12-17 22:44 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2019-12-17 22:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix error reporting for index expressions of prohibited types. If CheckAttributeType() threw an error about the datatype of an index expression column, it would report an empty column name, which is pretty unhelpful and certainly not the intended behavior. I (tgl) evidently broke this in commit cfc5008a5, by not noticing that the column's attname was used above where I'd placed the assignment of it. In HEAD and v12, this is trivially fixable by moving up the assignment of attname. Before v12 the code is a bit more messy; to avoid doing substantial refactoring, I took the lazy way out and just put in two copies of the assignment code. Report and patch by Amit Langote. Back-patch to all supported branches. Discussion: https://postgr.es/m/CA+HiwqFA+BGyBFimjiYXXMa2Hc3fcL0+OJOyzUNjhU4NCa_XXw@mail.gmail.com Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/298d056d9d9786bac9c645be0011e8229029aa21 Modified Files -------------- src/backend/catalog/index.c | 24 ++++++++++++------- src/test/regress/expected/create_index.out | 37 ++++++++++++++++++++++++++++++ src/test/regress/sql/create_index.sql | 12 ++++++++++ 3 files changed, 65 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2019-12-17 22:44 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-12-17 22:44 pgsql: Fix error reporting for index expressions of prohibited types. Tom Lane <tgl@sss.pgh.pa.us> 2019-12-17 22:44 pgsql: Fix error reporting for index expressions of prohibited types. Tom Lane <tgl@sss.pgh.pa.us> 2019-12-17 22:44 pgsql: Fix error reporting for index expressions of prohibited types. Tom Lane <tgl@sss.pgh.pa.us> 2019-12-17 22:44 pgsql: Fix error reporting for index expressions of prohibited types. Tom Lane <tgl@sss.pgh.pa.us> 2019-12-17 22:44 pgsql: Fix error reporting for index expressions of prohibited types. Tom Lane <tgl@sss.pgh.pa.us> 2019-12-17 22:44 pgsql: Fix error reporting for index expressions of prohibited types. Tom Lane <tgl@sss.pgh.pa.us> 2019-12-17 22:44 pgsql: Fix error reporting for index expressions of prohibited types. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox