Storing a very large matrix on Postgresql
I would create a table with three columns:

create table distances
(
  from_zip_code int not null,
  to_zip_code int not null,
  distance numeric not null, 
  primary key (from_zip_code, to_zip_code)
);


If you want, you can prevent storing the reversed combination through a unique index. 

If your ZIP codes aren't numbers, then obviously you need to use text or varchar for those two columns.

While the table is moderately large (9550 * 9550 rows), access through the primary key is typically pretty much constant in time.