1 million strings and exact match search
PostgreSQL is perfectly fine for this.
You got a couple of options to make this work.

First of all: 
PostgreSQL has a special index type for that called GIN (http://www.cybertec.at/gin-just-an-index-type/). It is perfect for full-text-search in general.

The cool thing is: In the latest version of PostgreSQL there is support for a thing called jsonb. You can put your string into a JSON document and search on EACH field in the JSON in a nice way using GIN and a couple of cool operators (see http://www.postgresql.org/docs/9.4/static/datatype-json.html).
JSONB is really really fast, very powerful and it definitely kills MongoDB on the performance side.
In addition to that a couple million of rows are no real big deal for PostgreSQL anyway.
There is one more cool thing: PostgreSQL can do fuzzy search on strings (through Nearest-Neighbour search).