Thread: View column defaults in pgAdminIII
I recently installed pgAdmin III and am happy to see the great work done by the team. Thank you very much for so great a software tool! Especially of interest to me are the facts that 1) the view definition DDL code is now presented with some CRLF's, i.e., more "pretty" than as in II, where it was one, large, continuos string. 2) rules on views are displayed. 3) complex type definitions are displayed. Now, is this mail list the appropriate place for improvement suggestions/feature requests? IF so, then what I'd like to see (and regret that I don't have the programming skills to actual implement these suggestions) are a) I'd really like the view DDL to include the CRLF's that I had put for formatting convenience in the original view creation statement, rather than have the pgAdminIII just insert them at pre-defined, generically appropriate places (which looks like before each major key word of a SELECT statement). When I want to review or modify a view definition, I often end up having to navigate with the right-arrow key through the view and inserting a CRLF before each view column, for instance. b) Include in the view definition DDL any column defaults. When I do a pg_dump -t myview... at the server console, the output includes not only the view DDL, rules, and permissions, but also column defaults. Would be nice for the sake of completeness to see the column defaults in the pgAdminIII DDL also. ~Berend Tober
Hi, > -----Original Message----- > From: btober@seaworthysys.com [mailto:btober@seaworthysys.com] > Sent: 13 October 2003 14:13 > To: pgadmin-support@postgresql.org > Subject: [pgadmin-support] View column defaults in pgAdminIII > > I recently installed pgAdmin III and am happy to see the > great work done by the team. > > Thank you very much for so great a software tool! You're welcome, glad you like it! > a) I'd really like the view DDL to include the CRLF's that I > had put for formatting convenience in the original view > creation statement, rather than have the pgAdminIII just > insert them at pre-defined, generically appropriate places > (which looks like before each major key word of a SELECT > statement). When I want to review or modify a view > definition, I often end up having to navigate with the > right-arrow key through the view and inserting a CRLF before > each view column, for instance. Unfortunately this is not possible because PostgreSQL doesn't retain the original SQL entered (see the many discussions about this on the pgsql-hackers list for details). > b) Include in the view definition DDL any column defaults. > When I do a pg_dump -t myview... at the server console, the > output includes not only the view DDL, rules, and > permissions, but also column defaults. Would be nice for the > sake of completeness to see the column defaults in the > pgAdminIII DDL also. I'm not sure what you mean here. Views don't have column defaults, only the underlying relations do. How would you expect that to be expressed in SQL (which pg_dump didn't do when I tried it btw)? Regards, Dave.
Dave Page wrote: >Hi, > > > >>-----Original Message----- >>From: btober@seaworthysys.com [mailto:btober@seaworthysys.com] >>Sent: 13 October 2003 14:13 >>To: pgadmin-support@postgresql.org >>Subject: [pgadmin-support] View column defaults in pgAdminIII >> >>I recently installed pgAdmin III and am happy to see the >>great work done by the team. >> >>Thank you very much for so great a software tool! >> >> > >You're welcome, glad you like it! > > > >>a) I'd really like the view DDL to include the CRLF's that I >>had put for formatting convenience in the original view >>creation statement, rather than have the pgAdminIII just >>insert them at pre-defined, generically appropriate places >>(which looks like before each major key word of a SELECT >>statement). When I want to review or modify a view >>definition, I often end up having to navigate with the >>right-arrow key through the view and inserting a CRLF before >>each view column, for instance. >> >> > >Unfortunately this is not possible because PostgreSQL doesn't retain the >original SQL entered (see the many discussions about this on the >pgsql-hackers list for details). > > Yes, and I had quite some fights to get this pretty-print functions into the backend for guys like us that don't like dozens of parentheses and a view definition of 10k on a single line. >>b) Include in the view definition DDL any column defaults. >>When I do a pg_dump -t myview... at the server console, the >>output includes not only the view DDL, rules, and >>permissions, but also column defaults. Would be nice for the >>sake of completeness to see the column defaults in the >>pgAdminIII DDL also. >> >> > >I'm not sure what you mean here. Views don't have column defaults, only >the underlying relations do. How would you expect that to be expressed >in SQL (which pg_dump didn't do when I tried it btw)? > > View columns are a bit... neglected at the moment. I took this on the TODO list. Regards, Andreas
> I'm not sure what you mean here. Views don't have column defaults, only > the underlying relations do. How would you expect that to be expressed > in SQL (which pg_dump didn't do when I tried it btw)? Not true, views can explicitly have defaults. Chris
>> Unfortunately this is not possible because PostgreSQL doesn't retain the >> original SQL entered (see the many discussions about this on the >> pgsql-hackers list for details). >> > Yes, and I had quite some fights to get this pretty-print functions into > the backend for guys like us that don't like dozens of parentheses and a > view definition of 10k on a single line. Hehehehe - we use all the pretty print stuff now in phpPgAdmin as well. Chris
Christopher Kings-Lynne wrote: >>> Unfortunately this is not possible because PostgreSQL doesn't retain >>> the >>> original SQL entered (see the many discussions about this on the >>> pgsql-hackers list for details). >> >> Yes, and I had quite some fights to get this pretty-print functions >> into the backend for guys like us that don't like dozens of >> parentheses and a view definition of 10k on a single line. > > > Hehehehe - we use all the pretty print stuff now in phpPgAdmin as well. > Yes, if you hadn't seconded we'd probably still not have it. Regards, Andreas