OK,
This makes psql use the new pg_get_viewdef function. It also puts one extra
line break in to improve formatting.
Chris
Index: src/bin/psql/describe.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/describe.c,v
retrieving revision 1.83
diff -c -r1.83 describe.c
*** src/bin/psql/describe.c 4 Aug 2003 23:59:40 -0000 1.83
--- src/bin/psql/describe.c 7 Aug 2003 04:43:53 -0000
***************
*** 746,752 ****
{
PGresult *result;
! printfPQExpBuffer(&buf, "SELECT
pg_catalog.pg_get_viewdef('%s'::pg_catalog.oid)", oid);
result = PSQLexec(buf.data, false);
if (!result)
goto error_return;
--- 746,752 ----
{
PGresult *result;
! printfPQExpBuffer(&buf, "SELECT
pg_catalog.pg_get_viewdef('%s'::pg_catalog.oid, true)", oid);
result = PSQLexec(buf.data, false);
if (!result)
goto error_return;
***************
*** 926,932 ****
footers = xmalloczero((rule_count + 2) * sizeof(*footers));
footers[count_footers] = xmalloc(64 + strlen(view_def));
snprintf(footers[count_footers], 64 + strlen(view_def),
! _("View definition: %s"), view_def);
count_footers++;
/* print rules */
--- 926,932 ----
footers = xmalloczero((rule_count + 2) * sizeof(*footers));
footers[count_footers] = xmalloc(64 + strlen(view_def));
snprintf(footers[count_footers], 64 + strlen(view_def),
! _("View definition:\n%s"), view_def);
count_footers++;
/* print rules */
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings