title: Compare text values in PostgreSQL
body: <p>Say, there are two tables. One contains a field with long text values (for example <code>foobarbaz</code>), the other one contains shorter values (<code>foobar</code> and <code>someothertext</code>). I'd like to retrieve values from two tables with the following condition: the text must not be equal, but the beginning of the long string must match the short string. Is there a (neat) way to do this in Postgres? Thanks in advance.</p>