From 2ae5d51668a4599427a801da62313584ab565c38 Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Wed, 27 Jan 1999 01:18:23 +0000 Subject: From: Tatsuo Ishii Included patches fix a portability problem of unsetenv() used in 6.4.2 multi-byte support. unsetenv() is only avaliable on FreeBSD and Linux so I decided to replace with putenv(). --- src/backend/parser/analyze.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/backend/parser/analyze.c') diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index 11b78c39266..f5b19d13a1b 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: analyze.c,v 1.95 1999/01/25 12:01:05 vadim Exp $ + * $Id: analyze.c,v 1.96 1999/01/27 01:18:20 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -714,6 +714,7 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt) index = makeNode(IndexStmt); index->unique = TRUE; + index->primary = (constraint->contype == CONSTR_PRIMARY ? TRUE:FALSE); if (constraint->name != NULL) index->idxname = constraint->name; else if (constraint->contype == CONSTR_PRIMARY) @@ -722,14 +723,10 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt) elog(ERROR, "CREATE TABLE/PRIMARY KEY multiple keys for table %s are not legal", stmt->relname); have_pkey = TRUE; - index->primary = TRUE; index->idxname = makeTableName(stmt->relname, "pkey", NULL); } else - { - index->primary = FALSE; index->idxname = NULL; - } index->relname = stmt->relname; index->accessMethod = "btree"; -- cgit v1.2.3