|
I love PostgreSQL.
Every now and then people talk about how great MySQL is, and I take another look
at it.
I don't see how people can use a database without subqueries, transactions,
and a point data type.
As an example, a few minutes ago, I wanted to set the default search radius for
some images in a remote area to 0.4 degree rather than 0.1 degree.
First I opened a transaction, just to be on the safe side.
Then, I executed
update pictures set dist=0.4
where box(location,location) @ box(circle( (select location from pictures where id=273),1));
After checking the number of modified rows, to make sure it seemed right, I ran
a query or two to check the changes, and finally ran the commit;
I'd love to see how to do that under MySQL :-) reply
|
| |