mirror of
https://github.com/postgres/postgres.git
synced 2025-07-20 05:03:10 +03:00
From: Tatsuo Ishii <t-ishii@sra.co.jp>
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().
This commit is contained in:
@ -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";
|
||||
|
Reference in New Issue
Block a user