Posts

Showing posts from December 9, 2018

Missing postgis causing pg_upgrade to fail on mac os x

Image
up vote 0 down vote favorite Following on from this question I get the following error in the log when i run pg_upgrade which causes it to fail pg_dump: [archiver (db)] query failed: ERROR: could not access file "$libdir/postgis-2.3": No such file or directory How do I resolve this? Do i need to install that extension to my new postgres version (10.5). There seems to be a solution described here for windows but I'm new to terminal and mac so not sure how i translate this. postgresql postgresql-9.6 postgresql-10 pg-upgrade postgis-installation share | improve this question asked Nov 11 at 21:10 mapping dom

How would I set up a method to update passed properties of JavaScript object?

Image
up vote 0 down vote favorite I'm looking to create a method for an object to update only the properties that are passed. for example function Car () { this.color = 'yellow' this.brand = 'bmw' this.key = 0 this.update = function (o) { this.key++ // maybe Object.assign(this, o) somehow ?? } } If I do Car.update({color:'red'}) I want to update the object but not overwrite the brand. I want to use something like Object.assign(this, o) but not sure how to assign it. Do I need to create a prototype? Car.prototype.update = ? javascript object methods prototype share | improve this question edited Nov 11 at 21:26