Seems pg_dump dumps funcions with a space between the function name and
opening paren.  It looks strange:

        SELECT pg_catalog.setval ('test_x_seq', 1, false);

This patch removes the space:

        SELECT pg_catalog.setval('test_x_seq', 1, false);

I didn't even realize the space worked, but it does:
        
        test=> select version ();
                                     version
        ------------------------------------------------------------------
         PostgreSQL 7.4beta1 on i386-pc-bsdi4.3.1, compiled by GCC 2.95.3
        (1 row)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/bin/pg_dump/pg_dump.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/pg_dump/pg_dump.c,v
retrieving revision 1.342
diff -c -c -r1.342 pg_dump.c
*** src/bin/pg_dump/pg_dump.c   4 Aug 2003 02:40:09 -0000       1.342
--- src/bin/pg_dump/pg_dump.c   8 Aug 2003 01:11:38 -0000
***************
*** 3698,3706 ****
  
        initPQExpBuffer(&fn);
        if (honor_quotes)
!               appendPQExpBuffer(&fn, "%s (", fmtId(finfo->proname));
        else
!               appendPQExpBuffer(&fn, "%s (", finfo->proname);
        for (j = 0; j < finfo->nargs; j++)
        {
                char       *typname;
--- 3698,3706 ----
  
        initPQExpBuffer(&fn);
        if (honor_quotes)
!               appendPQExpBuffer(&fn, "%s(", fmtId(finfo->proname));
        else
!               appendPQExpBuffer(&fn, "%s(", finfo->proname);
        for (j = 0; j < finfo->nargs; j++)
        {
                char       *typname;
***************
*** 6007,6013 ****
        if (!schemaOnly)
        {
                resetPQExpBuffer(query);
!               appendPQExpBuffer(query, "SELECT pg_catalog.setval (");
                appendStringLiteral(query, fmtId(tbinfo->relname), true);
                appendPQExpBuffer(query, ", %s, %s);\n",
                                                  last, (called ? "true" : "false"));
--- 6007,6013 ----
        if (!schemaOnly)
        {
                resetPQExpBuffer(query);
!               appendPQExpBuffer(query, "SELECT pg_catalog.setval(");
                appendStringLiteral(query, fmtId(tbinfo->relname), true);
                appendPQExpBuffer(query, ", %s, %s);\n",
                                                  last, (called ? "true" : "false"));
***************
*** 6384,6393 ****
  
                        /* In 7.3, result of regproc is already quoted */
                        if (g_fout->remoteVersion >= 70300)
!                               appendPQExpBuffer(query, "EXECUTE PROCEDURE %s (",
                                                                  tgfname);
                        else
!                               appendPQExpBuffer(query, "EXECUTE PROCEDURE %s (",
                                                                  fmtId(tgfname));
                        for (findx = 0; findx < tgnargs; findx++)
                        {
--- 6384,6393 ----
  
                        /* In 7.3, result of regproc is already quoted */
                        if (g_fout->remoteVersion >= 70300)
!                               appendPQExpBuffer(query, "EXECUTE PROCEDURE %s(",
                                                                  tgfname);
                        else
!                               appendPQExpBuffer(query, "EXECUTE PROCEDURE %s(",
                                                                  fmtId(tgfname));
                        for (findx = 0; findx < tgnargs; findx++)
                        {
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to