Open jaronwest opened 1 year ago
A possible fix is to check before this query if the table name contains a dot (.) character and if so, break it apart and run query as TABLE_SCHEMA = and TABLE_NAME = https://github.com/gearman/gearmand/blob/master/libgearman-server/plugins/queue/postgres/queue.cc#L207
Yep. Would you be willing to contribute a PR to do that, @jaronwest ?
When running gearman using Postgres, currently only the default schema can be used when specifying the table name. If
--libpq-table=someschema.gearman_table
were used it would correctly generate the table on deploy in the specified schema, but the next time it is run again, it will check for table name in INFORMATION_SCHEMA.TABLES rather than breaking it into schema and table name, then generate an error that the resource already exists when it tries to create it. A possible fix is to check before this query if the table name contains a dot (.) character and if so, break it apart and run query asTABLE_SCHEMA =
andTABLE_NAME =
https://github.com/gearman/gearmand/blob/master/libgearman-server/plugins/queue/postgres/queue.cc#L207