Yes. This is horribly ugly, and I suspect that you cannot do it without making TABLESPACE a fully-reserved word.
No, I've already done it and it works just fine. What is your suggestion then? Just assume the name of the index it will get?
Also, I realised that the pg_get_serial_sequence() doesn't solve the whole sequence autonaming problem :( Specifically, dump entries like this:
COMMENT ON SEQUENCE blah_seq IS 'asdfsdfa';
Chris
---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match