pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix pg_dump to not emit invalid SQL for an empty operator class. 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix pg_dump to not emit invalid SQL for an empty operator class. @ 2017-05-26 16:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-05-26 16:51 UTC (permalink / raw) To: pgsql-committers Fix pg_dump to not emit invalid SQL for an empty operator class. If an operator class has no operators or functions, and doesn't need a STORAGE clause, we emitted "CREATE OPERATOR CLASS ... AS ;" which is syntactically invalid. Fix by forcing a STORAGE clause to be emitted anyway in this case. (At some point we might consider changing the grammar to allow CREATE OPERATOR CLASS without an opclass_item_list. But probably we'd want to omit the AS in that case, so that wouldn't fix this pg_dump issue anyway.) It's been like this all along, so back-patch to all supported branches. Daniel Gustafsson, tweaked by me to avoid a dangling-pointer bug Discussion: https://postgr.es/m/D9E5FC64-7A37-4F3D-B946-7E4FB468F88A@yesql.se Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0461b66e361f56560aaa50e1bd006e36e8bedc6e Modified Files -------------- src/bin/pg_dump/pg_dump.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix pg_dump to not emit invalid SQL for an empty operator class. @ 2017-05-26 16:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-05-26 16:51 UTC (permalink / raw) To: pgsql-committers Fix pg_dump to not emit invalid SQL for an empty operator class. If an operator class has no operators or functions, and doesn't need a STORAGE clause, we emitted "CREATE OPERATOR CLASS ... AS ;" which is syntactically invalid. Fix by forcing a STORAGE clause to be emitted anyway in this case. (At some point we might consider changing the grammar to allow CREATE OPERATOR CLASS without an opclass_item_list. But probably we'd want to omit the AS in that case, so that wouldn't fix this pg_dump issue anyway.) It's been like this all along, so back-patch to all supported branches. Daniel Gustafsson, tweaked by me to avoid a dangling-pointer bug Discussion: https://postgr.es/m/D9E5FC64-7A37-4F3D-B946-7E4FB468F88A@yesql.se Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5886c7d5893f88efe5de0bf78d9a1439d09c004a Modified Files -------------- src/bin/pg_dump/pg_dump.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix pg_dump to not emit invalid SQL for an empty operator class. @ 2017-05-26 16:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-05-26 16:51 UTC (permalink / raw) To: pgsql-committers Fix pg_dump to not emit invalid SQL for an empty operator class. If an operator class has no operators or functions, and doesn't need a STORAGE clause, we emitted "CREATE OPERATOR CLASS ... AS ;" which is syntactically invalid. Fix by forcing a STORAGE clause to be emitted anyway in this case. (At some point we might consider changing the grammar to allow CREATE OPERATOR CLASS without an opclass_item_list. But probably we'd want to omit the AS in that case, so that wouldn't fix this pg_dump issue anyway.) It's been like this all along, so back-patch to all supported branches. Daniel Gustafsson, tweaked by me to avoid a dangling-pointer bug Discussion: https://postgr.es/m/D9E5FC64-7A37-4F3D-B946-7E4FB468F88A@yesql.se Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/41c4eb5ec6118559a22d32ef85797558c0b9d3d5 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix pg_dump to not emit invalid SQL for an empty operator class. @ 2017-05-26 16:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-05-26 16:51 UTC (permalink / raw) To: pgsql-committers Fix pg_dump to not emit invalid SQL for an empty operator class. If an operator class has no operators or functions, and doesn't need a STORAGE clause, we emitted "CREATE OPERATOR CLASS ... AS ;" which is syntactically invalid. Fix by forcing a STORAGE clause to be emitted anyway in this case. (At some point we might consider changing the grammar to allow CREATE OPERATOR CLASS without an opclass_item_list. But probably we'd want to omit the AS in that case, so that wouldn't fix this pg_dump issue anyway.) It's been like this all along, so back-patch to all supported branches. Daniel Gustafsson, tweaked by me to avoid a dangling-pointer bug Discussion: https://postgr.es/m/D9E5FC64-7A37-4F3D-B946-7E4FB468F88A@yesql.se Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1cfc9dc75b175c68443c50a359ae5b7a2529326e Modified Files -------------- src/bin/pg_dump/pg_dump.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix pg_dump to not emit invalid SQL for an empty operator class. @ 2017-05-26 16:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-05-26 16:51 UTC (permalink / raw) To: pgsql-committers Fix pg_dump to not emit invalid SQL for an empty operator class. If an operator class has no operators or functions, and doesn't need a STORAGE clause, we emitted "CREATE OPERATOR CLASS ... AS ;" which is syntactically invalid. Fix by forcing a STORAGE clause to be emitted anyway in this case. (At some point we might consider changing the grammar to allow CREATE OPERATOR CLASS without an opclass_item_list. But probably we'd want to omit the AS in that case, so that wouldn't fix this pg_dump issue anyway.) It's been like this all along, so back-patch to all supported branches. Daniel Gustafsson, tweaked by me to avoid a dangling-pointer bug Discussion: https://postgr.es/m/D9E5FC64-7A37-4F3D-B946-7E4FB468F88A@yesql.se Branch ------ REL9_3_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a561254e4c620ca9d62044520bd05cfe687f786c Modified Files -------------- src/bin/pg_dump/pg_dump.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix pg_dump to not emit invalid SQL for an empty operator class. @ 2017-05-26 16:51 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-05-26 16:51 UTC (permalink / raw) To: pgsql-committers Fix pg_dump to not emit invalid SQL for an empty operator class. If an operator class has no operators or functions, and doesn't need a STORAGE clause, we emitted "CREATE OPERATOR CLASS ... AS ;" which is syntactically invalid. Fix by forcing a STORAGE clause to be emitted anyway in this case. (At some point we might consider changing the grammar to allow CREATE OPERATOR CLASS without an opclass_item_list. But probably we'd want to omit the AS in that case, so that wouldn't fix this pg_dump issue anyway.) It's been like this all along, so back-patch to all supported branches. Daniel Gustafsson, tweaked by me to avoid a dangling-pointer bug Discussion: https://postgr.es/m/D9E5FC64-7A37-4F3D-B946-7E4FB468F88A@yesql.se Branch ------ REL9_2_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f62e1eff524ab9927cbadda07060cd0b30b1fc72 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2017-05-26 16:51 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2017-05-26 16:51 pgsql: Fix pg_dump to not emit invalid SQL for an empty operator class. Tom Lane <tgl@sss.pgh.pa.us> 2017-05-26 16:51 pgsql: Fix pg_dump to not emit invalid SQL for an empty operator class. Tom Lane <tgl@sss.pgh.pa.us> 2017-05-26 16:51 pgsql: Fix pg_dump to not emit invalid SQL for an empty operator class. Tom Lane <tgl@sss.pgh.pa.us> 2017-05-26 16:51 pgsql: Fix pg_dump to not emit invalid SQL for an empty operator class. Tom Lane <tgl@sss.pgh.pa.us> 2017-05-26 16:51 pgsql: Fix pg_dump to not emit invalid SQL for an empty operator class. Tom Lane <tgl@sss.pgh.pa.us> 2017-05-26 16:51 pgsql: Fix pg_dump to not emit invalid SQL for an empty operator class. 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