Re: Does this table exist?
Ashley Clark <aclark@ghoti.org>
From: Ashley Clark <aclark@ghoti.org>
To: pgsql-general@postgresql.org
Date: 2000-11-02T21:01:45Z
Lists: pgsql-general
Well, I'll answer your questions and help you a little too, or at least try... * Alvaro Herrera in "[GENERAL] Does this table exist?" dated 2000/11/02 * 17:44 wrote: > Now, I'm building a database to hold customer data that needs to be > organized in a one-table-per-customer manner. No, I don't think > there's another way to do this, as these tables are potentially very > big not in the sense that I have too many customers, but in that I > need to hold very large amounts of data for each. This probably means you need to rethink your database design, it's a process called normalization, I won't go into it right now, but you should check it out. For example, a customer table with all your customers in it with a separate call information table that links call info to customers. > Now, the question is: Is there a way to know if a given table exist? > Besides doing a direct query to it, of course, as I think that would > be too much of a dinamite-fishing way of doing it. You can get a query to do this if you go into psql -E, and use the \dt command, actually with -E on the command line, all of the \ commands will print out the queries they are using. -- chalk slayer