summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBruce Momjian1998-08-26 16:43:54 +0000
committerBruce Momjian1998-08-26 16:43:54 +0000
commitd394d06d7ab2e31969735479885cbfd544eb309a (patch)
tree9d589005236a61a83d0a43e6c2b0e54a532a1e88 /src/include
parente2b0911564052296fff26e0a485c8ca00a8221bc (diff)
Fix atttypmod alignment again, and re-enable ecpg.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/pg_attribute.h4
-rw-r--r--src/include/catalog/pg_attribute_check.sql17
2 files changed, 19 insertions, 2 deletions
diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h
index d908c54dcc..0e88c86904 100644
--- a/src/include/catalog/pg_attribute.h
+++ b/src/include/catalog/pg_attribute.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_attribute.h,v 1.37 1998/08/26 05:51:24 momjian Exp $
+ * $Id: pg_attribute.h,v 1.38 1998/08/26 16:43:48 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -339,7 +339,7 @@ DATA(insert OID = 0 ( 1249 attlen 21 0 2 5 0 -1 -1 t f s f f));
DATA(insert OID = 0 ( 1249 attnum 21 0 2 6 0 -1 -1 t f s f f));
DATA(insert OID = 0 ( 1249 attnelems 23 0 4 7 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1249 attcacheoff 23 0 4 8 0 -1 -1 t f i f f));
-DATA(insert OID = 0 ( 1249 atttypmod 21 0 4 9 0 -1 -1 t f s f f));
+DATA(insert OID = 0 ( 1249 atttypmod 23 0 4 9 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1249 attbyval 16 0 1 10 0 -1 -1 t f c f f));
DATA(insert OID = 0 ( 1249 attisset 16 0 1 11 0 -1 -1 t f c f f));
DATA(insert OID = 0 ( 1249 attalign 18 0 1 12 0 -1 -1 t f c f f));
diff --git a/src/include/catalog/pg_attribute_check.sql b/src/include/catalog/pg_attribute_check.sql
new file mode 100644
index 0000000000..20264fb41a
--- /dev/null
+++ b/src/include/catalog/pg_attribute_check.sql
@@ -0,0 +1,17 @@
+-- This makes sure the pg_attribute columns match the type's columns
+-- bjm 1998/08/26
+
+-- check lengths
+SELECT pg_attribute.oid, relname, attname
+FROM pg_class, pg_attribute, pg_type
+WHERE pg_class.oid = attrelid AND
+ atttypid = pg_type.oid AND
+ attlen != typlen;
+
+-- check alignment
+SELECT pg_attribute.oid, relname, attname
+FROM pg_class, pg_attribute, pg_type
+WHERE pg_class.oid = attrelid AND
+ atttypid = pg_type.oid AND
+ attalign != typalign;
+