Re: ignore tablespace in schema definition queries

2021-04-03 Thread Joao Miguel Ferreira
Hi Allan and Mark, Thank you for your thoughts. I ended up writing a 1000 lines SQL file with the SQL commands for creation of the 1000 tablespaces. I keep the file with my bootstrap scripts and I'm loading with the psql client. It works just fine and it is quite very fast. I was a bit afraid it

Re: ignore tablespace in schema definition queries

2021-04-03 Thread Mark Johnson
The solution depends on how you are creating the tables. For example: the pg_restore has option —-no-tablespaces. With this option, all objects will be created in whichever tablespace is the default during restore. The pg_dump has similar. If you are running CREATE TABLE statements that have ha

Re: ignore tablespace in schema definition queries

2021-04-03 Thread Allan Kamau
On Sat, Apr 3, 2021 at 1:59 PM Joao Miguel Ferreira < joao.miguel.c.ferre...@gmail.com> wrote: > Hello all, > > I have a big set of migration queries (that I do not control) that I must > run on my automatic test database, in order to set ip up and run tests. > These queries create all sorts of th

ignore tablespace in schema definition queries

2021-04-03 Thread Joao Miguel Ferreira
Hello all, I have a big set of migration queries (that I do not control) that I must run on my automatic test database, in order to set ip up and run tests. These queries create all sorts of things like indexes, tables, and so. But they also include the specification of the tablespace they expect