Do you mean a generic query that will return a list of all table names? If that's what you want, there's no special function that will do it, but an ordinary query of the system tables will provide that information.
Do you have shell access to the machine with your database? (Or any other machine with the same version of Postgresql installed? Just use the psql utility starting it with the '-E' flag: this will echo the queries used to create the \d series of commands that display table information.