pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/gtksql Use proper multi-line string concaten...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d6b41a138d3d
branches:  trunk
changeset: 460953:d6b41a138d3d
user:      kleink <kleink%pkgsrc.org@localhost>
date:      Mon Sep 08 12:13:49 2003 +0000

description:
Use proper multi-line string concatenation.

diffstat:

 databases/gtksql/distinfo         |   3 +-
 databases/gtksql/patches/patch-ab |  65 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+), 1 deletions(-)

diffs (80 lines):

diff -r 3a538299aeb1 -r d6b41a138d3d databases/gtksql/distinfo
--- a/databases/gtksql/distinfo Mon Sep 08 12:11:14 2003 +0000
+++ b/databases/gtksql/distinfo Mon Sep 08 12:13:49 2003 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.7 2002/09/21 08:10:56 jlam Exp $
+$NetBSD: distinfo,v 1.8 2003/09/08 12:13:49 kleink Exp $
 
 SHA1 (gtksql-0.3.tar.gz) = b2d078cb0eb8816b26f3e0369fc440085071fc0c
 Size (gtksql-0.3.tar.gz) = 50557 bytes
 SHA1 (patch-aa) = 6ec9ce239bcf5516e47aca39942168b16549f0a1
+SHA1 (patch-ab) = 0d194dd153e3d3ce34b0f0d805ae0d83408de33b
diff -r 3a538299aeb1 -r d6b41a138d3d databases/gtksql/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/gtksql/patches/patch-ab Mon Sep 08 12:13:49 2003 +0000
@@ -0,0 +1,65 @@
+$NetBSD: patch-ab,v 1.1 2003/09/08 12:13:50 kleink Exp $
+
+--- postgres.c.orig    1999-06-05 15:05:36.000000000 +0200
++++ postgres.c 2003-09-08 14:11:15.000000000 +0200
+@@ -129,14 +129,14 @@
+   PGresult *table_info;
+   char query[512];
+ 
+-  sprintf(query, "SELECT a.attnum, a.attname, t.typname, a.attlen,
+-                         a.atttypmod, a.attnotnull, a.atthasdef
+-                  FROM pg_class c, pg_attribute a, pg_type t
+-                  WHERE c.relname = '%s' AND
+-                        a.attnum > 0 AND
+-                        a.attrelid = c.oid AND
+-                        a.atttypid = t.oid
+-                  ORDER BY attnum", tbf->name);
++  sprintf(query, "SELECT a.attnum, a.attname, t.typname, a.attlen,"\
++                        "a.atttypmod, a.attnotnull, a.atthasdef"\
++                 "FROM pg_class c, pg_attribute a, pg_type t"\
++                 "WHERE c.relname = '%s' AND"\
++                       "a.attnum > 0 AND"\
++                       "a.attrelid = c.oid AND"\
++                       "a.atttypid = t.oid"\
++                 "ORDER BY attnum", tbf->name);
+   
+   table_info = PQexec(conn, query);
+   if ((table_info == NULL) ||
+@@ -183,11 +183,11 @@
+       if (rnotnull[0] == 't')
+       strcat(type_str, " not null");
+       if (rhasdef[0] == 't') {
+-      sprintf(buf, "SELECT d.adsrc
+-                      FROM pg_attrdef d, pg_class c
+-                      WHERE c.relname = '%s' AND
+-                            c.oid = d.adrelid AND
+-                            d.adnum = %s",
++      sprintf(buf, "SELECT d.adsrc"\
++                     "FROM pg_attrdef d, pg_class c"\
++                     "WHERE c.relname = '%s' AND"\
++                           "c.oid = d.adrelid AND"\
++                           "d.adnum = %s",
+               tbf->name, PQgetvalue(table_info, i, 0));
+       table_info2 = PQexec(conn, buf);
+       if ((table_info2 == NULL) ||
+@@ -240,13 +240,13 @@
+     PGresult *tables;
+     char query[512];
+     
+-    sprintf(query, "SELECT usename, relname, relkind, relhasrules
+-                    FROM pg_class, pg_user
+-                    WHERE relkind = 'r' AND
+-                          relname !~ '^pg_' AND
+-                          relname !~ '^xin[vx][0-9]+' AND
+-                          usesysid = relowner
+-                    ORDER BY relname");
++    sprintf(query, "SELECT usename, relname, relkind, relhasrules"\
++                   "FROM pg_class, pg_user"\
++                   "WHERE relkind = 'r' AND"\
++                         "relname !~ '^pg_' AND"\
++                         "relname !~ '^xin[vx][0-9]+' AND"\
++                         "usesysid = relowner"\
++                   "ORDER BY relname");
+   
+     tables = PQexec(conn->conn, query);
+     if ((tables == NULL) || (PQresultStatus(tables) != PGRES_TUPLES_OK)) {



Home | Main Index | Thread Index | Old Index