From fc677c3a3bd3ddb09672777d6f4e53d213d3c8de Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Mon, 12 Jul 2010 14:10:27 +0000 Subject: [PATCH] Use pg_get_expr(adbin, ..) instead of unreliable adsrc in pg_attrdef so as to know the sequence name associated with serial items. --- info.c | 4 +++- version.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/info.c b/info.c index feb7fd2..346a499 100644 --- a/info.c +++ b/info.c @@ -2090,9 +2090,11 @@ retry_public_schema: snprintf(columns_query, sizeof(columns_query), "select n.nspname, c.relname, a.attname, a.atttypid" ", t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull" - ", c.relhasrules, c.relkind, c.oid, d.adsrc, %s from (((pg_catalog.pg_class c" + ", c.relhasrules, c.relkind, c.oid, %s, %s from (((pg_catalog.pg_class c" " inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace", PG_VERSION_GE(conn, 7.4) ? + "pg_get_expr(d.adbin, d.adrelid)" : "d.adsrc", + PG_VERSION_GE(conn, 7.4) ? "case t.typtype when 'd' then t.typbasetype else 0 end, t.typtypmod" : "0, -1"); if (search_by_ids) diff --git a/version.h b/version.h index 1fba137..d7996e4 100644 --- a/version.h +++ b/version.h @@ -12,6 +12,6 @@ #define POSTGRESDRIVERVERSION "08.04.0201" #define POSTGRES_RESOURCE_VERSION "08.04.0201\0" #define PG_DRVFILE_VERSION 8,4,02,01 -#define PG_BUILD_VERSION "201006220001" +#define PG_BUILD_VERSION "201007120001" #endif -- 2.39.5