On 2 January 2016 at 15:55, Álvaro Hernández Tortosa <aht@8kdata.com> wrote:
On 29/12/15 20:22, Kevin Wooten wrote:
Add “schema change notifications”.
This is an interesting idea.
I wonder, however, if a protocol message is the place for it. I think it belongs to logical decoding (and yes, I know there is no current support for DDL in logical decoding, but there should be). So I wouldn't add this specifically to the febe protocol.
Currently “-ng” uses a bit of magic, mid query, to detect when schema changes have occurred. This is how the binary types remain correctly mapped. A notification sent whenever a type (basically anything in pg_type) is altered in any way would solve this problem perfectly. It would be best if the notification included the type oids that changed.
The infrastructure is already there in both needed respects, notifications & it already knows internally about the changes) so this should be something that could be easily added to the current protocol.