Re: [GENERAL] Using a VIEW as a temporary mechanism for renaming a table

2016-06-14 Thread Ben Buckman
rename a table. On Wed, Jun 8, 2016 at 3:55 PM, Berend Tober wrote: > Ben Buckman wrote: > >> Hello, >> I would like to rename a table with ~35k rows (on pgsql 9.4), let's say >> from `oldthings` to `newthings`. >> Our application is actively reading from and

Re: [GENERAL] Using a VIEW as a temporary mechanism for renaming a table

2016-06-08 Thread Ben Buckman
; On 6/8/2016 12:57 PM, Ben Buckman wrote: > >> Hello, >> I would like to rename a table with ~35k rows (on pgsql 9.4), let's say >> from `oldthings` to `newthings`. >> Our application is actively reading from and writing to this table, and >> the code will break

Re: [GENERAL] Using a VIEW as a temporary mechanism for renaming a table

2016-06-08 Thread Ben Buckman
Thanks Andy. My understanding, and please correct me if I'm wrong, is that the view will effectively inherit the table's constraints, because writes to the view that can't be written to the table will fail on the table. Re: "will the data be good data," what risks should I be considering? In term

[GENERAL] Using a VIEW as a temporary mechanism for renaming a table

2016-06-08 Thread Ben Buckman
nutes.) What are people's thoughts on this approach? Is there a flaw or potential danger that I should be aware of? Is there a simpler approach I should consider instead? Thank you -- [image: Shyp] *Ben Buckman / Platform Engineering* www.shyp.com Shipping made easy <https://www.shyp.com/>