From ebdfac3bb115dfa6f77b851188de3c132f43d966 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 25 Sep 2000 12:58:47 +0000 Subject: the patch include: - rename ichar() to chr() (discussed with Tom) - add docs for oracle compatible routines: btrim() ascii() chr() repeat() - fix bug with timezone in to_char() - all to_char() variants return NULL instead textin("") if it's needful. The contrib/odbc is without changes and contains same routines as main tree ... because I not sure how plans are Thomas with this :-) Karel --------------------------------------------------------------------------- This effectively one line patch should fix the fact that foreign key definitions in create table were erroring if a primary key was defined. I was using the columns list to get the columns of the table for comparison, but it got reused as a temporary list inside the primary key stuff. Stephan Szabo --- src/backend/parser/analyze.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/parser/analyze.c') diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index 0165ef15c2..888f8f8e14 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: analyze.c,v 1.157 2000/09/12 21:07:00 tgl Exp $ + * $Id: analyze.c,v 1.158 2000/09/25 12:58:46 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1083,7 +1083,7 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt) foreach(fkattrs, fkconstraint->fk_attrs) { found=0; fkattr=lfirst(fkattrs); - foreach(cols, columns) { + foreach(cols, stmt->tableElts) { col=lfirst(cols); if (strcmp(col->colname, fkattr->name)==0) { found=1; -- cgit v1.2.1