CREATE TABLE foo (id serial);

I mean, I can do either but I would like to get a clear definition of what we are looking for here. Maybe:

pg_get_tabledef is the actual SQL and pg_get_tabledesc() is the column, datatype output?

I guess I don't see the advantage of putting pg_dump -s -t in the backend.

If all you want is column, datatype, why not just use info_schema, or
newsysviews? Or even the base catalogs?

Where do I look in the info_schema? How do I know exactly what I need? What is newsysviews?

Of course I know the answers to these but many people don't. Newsysviews is a no-op unless it is in the backend (will it be for 8.2?). Secondly in a email I just sent I did say we can add anything we want, but the CREATE TABLE statement doesn't seem that useful.

I will create either or both I don't really care :).

ISTM what would be of the most value is a way to get the actual DDL you
need to create the table (which includes a heck of a lot more than just
column names and data types).

Name and datatype was just an example. I am trying to get people to actually provide feedback (thank you). Andrew brought up that also including the constraints would be a good idea which I agree.

Joshua D. Drake


--

            === The PostgreSQL Company: Command Prompt, Inc. ===
      Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
      Providing the most comprehensive  PostgreSQL solutions since 1997
                     http://www.commandprompt.com/



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to