Than is never a relative pronoun. It's always a comparative 'operator'†, used to introduce the entity to which something is compared when a difference is asserted:
John is smarter than Bob.
I spent less than I expected.
This computer is more expensive than that one.
You are probably confused because comparisons of this sort usually involve dropping at least one term, and it is very common to drop more. Your example, for instance, has the underlying structure:
It was a more expensive computer than the computer I saw yesterday was expensive.
The piece I struck through, which repeats the term which measures the values compared, is always omitted if both entities are compared on the same scale‡. But other terms may be omitted if the hearer can be expected to 'recover' them from the context; in your example the speaker assumes the hearer will understand that this computer is being compared to another computer:
It was a more expensive computer than the computer I saw yesterday.
You've got to be careful, though. I'd call this omission of any term designating the entity compared to only marginally grammatical. The relative clause I saw yesterday has no evident referent, and is consequently ambiguous: it might represent more expensive . . . than I saw it to be yesterday. This is acceptable only in casual speech.
†What you call it depends on what grammatical sect you adhere to. Some sects call it a conjunction, some an adverb; I'd classify it as a preposition, but it doesn't really matter.
‡ An example of entities compared on different scales would be The Challenger Deep is deeper than Mt. Everest is high—here both scales, deep and high must be included.