aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-01-19 02:37:51 +0000
committerBruce Momjian <bruce@momjian.us>1998-01-19 02:37:51 +0000
commit691dc282f81ff2333837b33f8517bfc08e31f37c (patch)
tree9988d36fbe570b855f2d85f12a45ac17264642cb /src/include
parent8169769ee5104d4bde9a713beefdd133658f3a0f (diff)
downloadpostgresql-691dc282f81ff2333837b33f8517bfc08e31f37c.tar.gz
postgresql-691dc282f81ff2333837b33f8517bfc08e31f37c.zip
Fix for SELECT INTO TABLE for varchar().
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/pg_attribute.h10
-rw-r--r--src/include/catalog/pg_type.h5
-rw-r--r--src/include/executor/executor.h4
3 files changed, 16 insertions, 3 deletions
diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h
index 0c43065b8e1..24810e82d41 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.22 1998/01/16 23:20:49 momjian Exp $
+ * $Id: pg_attribute.h,v 1.23 1998/01/19 02:37:45 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -89,6 +89,14 @@ CATALOG(pg_attribute) BOOTSTRAP
/*
* atttypmod records type-specific modifications supplied at table
* creation time.
+ * This is not integrated into all areas of the source. It is in
+ * TypeName to pass typmod info from the parser during table creation
+ * time, and it is used in the parser when converting a string to a
+ * typed constant associated with a variable. We also have a hack in
+ * execMain.c/execUtils.c that uses atttypmod to properly create tables
+ * for SELECT * INTO TABLE test2 FROM test;
+ * One day, we may add this to Resdom, and pass it through all areas.
+ * 1998/1/18 bjm
*/
bool attbyval;
diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h
index 087dc7f4b42..e324a785a3c 100644
--- a/src/include/catalog/pg_type.h
+++ b/src/include/catalog/pg_type.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_type.h,v 1.26 1997/11/26 04:50:47 momjian Exp $
+ * $Id: pg_type.h,v 1.27 1998/01/19 02:37:47 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -364,6 +364,9 @@ DATA(insert OID = 1296 ( timestamp PGUID 4 19 t b t \054 0 0 timestamp_in time
DESCR("limited-range ISO-format date and time");
#define TIMESTAMPOID 1296
+
+#define USE_ATTTYPMOD(typeid) ((typeid) == BPCHAROID || (typeid) == VARCHAROID)
+
/*
* prototypes for functions in pg_type.c
*/
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index 68550ff2aaf..5837b7bf5fe 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: executor.h,v 1.17 1998/01/14 15:48:43 momjian Exp $
+ * $Id: executor.h,v 1.18 1998/01/19 02:37:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -120,6 +120,8 @@ extern TupleDesc ExecTypeFromTL(List *targetList);
extern void ResetTupleCount(void);
extern void ExecAssignNodeBaseInfo(EState *estate, CommonState *basenode,
Plan *parent);
+extern void setAtttypmodForCreateTable(TupleDesc tupType, List *targetList,
+ List *rangeTable);
extern void ExecAssignExprContext(EState *estate, CommonState *commonstate);
extern void ExecAssignResultType(CommonState *commonstate,
TupleDesc tupDesc);