Not long ago (a week at most), I bumped into this post by Qiong Woo on Quora. There, she says the two sentences 我昨天去图书馆的 and 我昨天去的图书馆 both mean "I went to the library yesterday", and, from the way she explains the difference, I gather the first one emphasizes the action, whereas the second one emphasizes the place.
My reaction: well, yeah, the first one is the 是…的 construction with 是 implied, so I know it means that… but the second one? «Doesn’t 我昨天去的图书馆 mean “the library I went to yesterday”, with “的” marking a relative clause?», I commented. «Not necessarily. If you mean to say “the library I went to yesterday”, it’s better to say “我昨天去的那个图书馆” when there are more than one library you are referring to, though it is still odd. But it’s clearer to take, say restaurant for instance, then “the restaurant I went to yesterday” becomes “我昨天去的那家餐厅”.», she replied.
First off, is it really necessary to add 那个 for this to be a relative clause, as her comment seems to suggest? Where does this way of making a past tense sentence come from? Is it really unambiguously "I went to the library yesterday", or can it mean that as well as "The library I went to yesterday"? If so, how do I distinguish? If not, which is the actual meaning?