actually forget about that generate_series() in sub queries, I just realized that it won't do. I don't have too much time to analyse and find solution, but essentially you need to do it like in my example. See, that's where normalization would help a lot. Ie, having a separate table for name, and surname - and than third one to connect them into full name. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general