You probably do not want a serial in BBB since you want to be setting the values. Use "a int references AAA" instead I think.
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org