The original idea behind the sorcerer was that it was a wizard that didn't have to select each individual spell slot each day like a regular wizard but had a pool of spells known that it could cast from until it ran out of slots, sacrificing the breadth of the wizard's possible knowledge for versatility and sustainability. Unfortunately a specialist wizard gets almost as many spell slots per day, earns new levels of spells faster than a sorcerer and can leave spell slots open to prepare new spells later. And it gets better than that when you play Pathfinder.
There's a new collection of Wizard-only feats called discoveries that wizards can take with their own feats or their one bonus feat every five levels. One of them is Fast Study, which allows the wizard to prepare all spells within 15 minutes instead of an hour, with the minimum prep time being 1 minute instead of 15.
And while banning opposition schools meant you couldn't use those spells ever in 3e, Pathfinder wizards find that sort of thing to be annoying. Opposition school spells can be learned as normal and merely require two spell slots instead of one to prepare, plus you take a -4 penalty to checks made to create items that have an opposition spell as a prereq. Of course, if even that slap on the wrist is too much, a level 9 wizard can take Opposition Research as a feat to go from two opposing schools to just one.
Now, if you want even more spells than you get from being a specialist wizard, take a look at your arcane bond. The familiar has previously been mentioned as a floating source of aid another bonuses, plus the ability to carry spells and even use magic items like wands if your familiar has the appropriate appendages, but your arcane bond isn't limited to just familiars. You can instead choose to have a bond with an item, which allows you to enchant the item as though you had the appropriate feat, and also once per day lets you cast any spell you know without expending a slot or even preparing it. The downside is that when you don't have the item on-hand you have to make an annoying concentration check or lose the spell when you cast. While annoying if your item is a weapon, wand or staff prone to getting smashed or dropped in a fight, if your item is something like an amulet or ring it can be incredibly difficult to remove, especially if your ring is enchanted so that it can't be removed without cutting off your finger. If you worry about pick-pockets shaking your hand, get a meridian belt, which allows you to wear rings on your feet (and while you can wear four rings, you can only have two active at a time). If you bond with an amulet, you can get one that lets you cast even more spells per day.
(Also, your wizard can use a pirate hook hand and still cast spells and deliver touch attacks.)
Should you wish to have some form of the sorcerer's ability to spam the same spell even if you didn't prepare enough copies, simply buy or build a few Pearls of Power, which allows you to recall any spell of a particular level based on the item that you prepared and then cast that day. You don't even have to use it to recover spells you think you might need, you can simply think "well, I cast my last copy of fly a few hours ago and here's a cliff I need to bypass. Order up!" Build them yourself and you can have a pretty pile of trinkets that you can keep in your back pocket for the low cost of 1000 gp multiplied by the square of the spell level. The Runestone of Power has a similar function for spontaneous casters, but costs twice as much.
So then there's the whole thing with the wizard's spellbook, which the wizard needs to prepare spells each day. Furthermore, each spell takes up 1 page per spell level, and scribing new spells outside of the free ones you get at each level costs 100 gp per page, which can add up. Fortunately, there's the Blessed Book, which is not only waterproof and locked (and can be magically locked to keep people other than you out), but can hold 1000 pages worth of spells for you and doesn't cost anything more when you do it. That's some big savings right there, and if you just spaced it out evenly you could store 18 spells per level of spell you could cast, more than enough for any wizard's needs.
But what if that wasn't enough for you? What would it take to store the knowledge of every spell?
Well, taking the list from the SRD and dumping it into Excel gives us the following spell counts:
Totaling it up gives us...
.5*28+1*99+2*134+3*114+4*94+5*87+6*75+7*66+8*48+9*45= 3235 pages worth of magic.
A little over three blessed books, so let's just call it four to give us room for the spells Paizo or the SRD hasn't had time to write in. This means that the Encyclopedia Magicka is a four volume set, though admittedly it'd take over a year working in 8 hour shifts to write them all down. And someone with a spellbook can take a feat to halve it even further, down to a two volume set and a sixth of the time, finishing up transcribing in a month or two. Or possibly even faster.
Two to four volumes of absolute power are fine and dandy, but that just means it takes fewer thefts to leave you with nothing. Well, for starters, fewer volumes means that there are fewer things you need to spend money on to trap the shit out of them. Spells that do area damage are probably a poor idea, but if you can somehow cast or find someone who can cast something like greater glyph of warding (such as by binding an outsider), you can attach some nice spells such as a geas along the lines of "give me back my book, you asshole." There are also fun magical traps you can put into the text such as sepia snake sigil which forces anyone who reads it to make a Reflex saving throw or be magically trapped for several days (and if you're willing to get creative, note that the spell works based on reading and line of sight/effect, so you can cast this thing on a banner and someone else can trigger it just by reading it, even from a distance using a telescope. Just make sure no one else reads it before the target).
At any rate, the good thing about spellbooks is that you only need them when you're preparing spells, which can be only a few minutes a day if you have the right feat. So when you're not using them, you can store them someplace safe, like maybe your bag of holding or portable hole, or maybe a paradox box which you store in a bag of holding in order to prevent people from getting at your encyclopedia collection (extradimensional spaces cease functioning when stored inside other extradimensional spaces, but that's not a huge burden in this case, it just means you need to pull your box out of storage when you need to open it).
But that might not be good enough for you. A glove of storing can store one object as a free action, shrinking it down and hiding it inside the glove. Sadly, you can only store one item, and your encyclopedia set might count as more than one for its purpose, even if you bind them together with a belt or something. And you can't wear more than one glove of storing at a time. The good news is that you don't have to be wearing the gloves in order for them to function, or you can split up the gloves among different people so that you hold one volume and then your monkey or imp familiar holds another.
If shrink item is used on a book, it shrinks to 1/16th of its normal dimensions, reduced from a book 12 inches tall, 8 inches wide and 1 inch thick to 3/4ths of an inch tall, 1/2 an inch wide and 1/16th of an inch thick, making it something that could comfortably sit on a quarter or d20, and shrink item can be used to make the item have a cloth-like consistency to make it more malleable. Shrink item can even be made permanent, so the caster can grow or shrink the item as needed or desired. Only one problem: shrink item specifically shrinks one non-magical item, and a set of magical encyclopedias is neither.
Fortunately, there is a way to bypass that. A security belt not only makes it harder to steal things from you, but can once per day shrink an item down as the shrink item spell. Since the wording is "as the shrink item spell" and not "cast shrink item", it means that it uses the shrink item effect while superseding the spell's restriction (size limit, nonmagical) with its own (just the size limit). The intent seems to be that you shrink things down and put them in the belt, but the rules don't specifically mention anything further, so there's nothing stopping you from shrinking an item and then doing what you wish. Since it's a once-per-day power you're going to need multiple belts (and someone else like a familiar to wear some of them if you don't want to take yours off because you like the long-term effects of your own belt), but you can shrink down every encyclopedia volume you have (though sadly, since it doesn't cast the spell, you can't make it permanent, so they only last up to five days or so). It's probably easier and cheaper to just have your DM let you shrink magical items or wait for a book to come up with a spell that does so, but you do what you have to.
You now have several tiny cloth swatches containing the sum total of every spell known to wizards. Now, if you don't want to lose them, you keep them with you, then think like a four-year old and stash them some place no pickpockets whatsoever are going to put their hands.
This is not as terrible of an idea as it sounds.
1) A blessed book is waterproof and presumably resilient to other things as well.
2) Prestidigitation is a spell that does many minor things among which is clean a cubic foot of items per round. It's also a spell any wizard can cast and as a cantrip it can be cast at-will.
3) There are numerous items that sustain a creature with no need for food or drink, among which is the ring of sustenance, favored by casters since it also allows them to refresh their spells after only two hours of rest. If you do not need to eat or drink, your systems are probably relatively... inert.
Your DM is unable to get to your spellbooks without bad-touching your wizard. If you require further security, invest in a chastity belt with an arcane lock, requiring thieves to spend several turns clearing the way. You can even make them spend turns checking for traps.
Should the spell expire or be dismissed, things become... interesting. Rules for shrinking and enlarging creatures imply that you can't use them to explode your way out of things or kill creatures through growth. And it is highly unlikely that casters will have line of effect to your spellbooks unless you're playing some very interesting games. Watch out for antimagic fields though.
If you don't want to deal with shrink item, recall that a portable hole is a 6 foot diameter, 10 foot deep hole that can be folded up into a swatch of cloth the size of a pocket handkerchief of negligible weight, and when folded up has a cloth-like consistency, making it useful for storing things close to your person. Stuff a portable hole up your portable hole and watch as your DM becomes unable to menace your spellbook without making things incredibly uncomfortable for the rest of the table (well, more uncomfortable than they already are now that you started this). Just make sure no one stuffs a bag of holding in there.