1

I am using multiple PostgreSQL schemas to provide data separation and segmentation. There is a pretty good tutorial on how to do that here, but one thing I do not like about this approach is that it is absolutely reliant on the URL to select a schema (so, for example, if I wanted to run a local test server to test something, it would not be able to select the right schema by itself).

Do I have any other options for selecting schema based on URL/source? Would Amazon's Route 53 be of any help here (since I am very likely going to be using it)

Chris Travers
  • 25,424
  • 6
  • 65
  • 182
Goro
  • 9,919
  • 22
  • 74
  • 108

1 Answers1

0

The blog post you have linked to no longer exists so I can;t be sure this is applicable to your problem but it would seem to me the obvious answer would be to have some sort of abstraction between the schema and the URL so that these are not tightly coupled. A testing configuration could then be used to direct to the appropriate schema.

I don't see any reason why you'd have to have a fully static mapping. You ought to be able to set things up so that in a testing configuration the mapping is different.

Chris Travers
  • 25,424
  • 6
  • 65
  • 182