Foreign Key constraint on Postgres necessary with GUI?
<p>I have a GUI program with a Postgres database. In the database, I have a customer table like this:</p>

<pre><code>id serial Primary Key | name
----------------------+------
21                    | Mr. Customer
</code></pre>

<p>I also have an invoices table like this (simplified):</p>

<pre><code>id | customer_id
---+------
4  | 21
</code></pre>

<p>I am not using Foreign Keys as my GUI does not allow anyone to insert a wrong number for the customer_id. However, my friend is telling me I am stupid to not use Foreign Keys. Can somebody point out a possible scenario where a wrong value could be inserted into the customer_id column? I will change my database for one good reason, but so far I have not thought of a reason.</p>