1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-09 06:21:09 +03:00

Make attalign match type alignment.

This commit is contained in:
Bruce Momjian
1998-08-26 05:22:58 +00:00
parent 651e31bb80
commit 093beb3560
10 changed files with 5411 additions and 5346 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.82 1998/08/26 04:20:27 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.83 1998/08/26 05:22:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -408,7 +408,7 @@ makeTableName(void *elem,...)
}
static char *
CreateIndexName(char *tname, char *cname, char *label, List *indices)
CreateIndexName(char *table_name, char *column_name, char *label, List *indices)
{
int pass = 0;
char *iname = NULL;
@@ -417,10 +417,10 @@ CreateIndexName(char *tname, char *cname, char *label, List *indices)
char name2[NAMEDATALEN + 1];
/* use working storage, since we might be trying several possibilities */
strcpy(name2, cname);
strcpy(name2, column_name);
while (iname == NULL)
{
iname = makeTableName(tname, name2, label, NULL);
iname = makeTableName(table_name, name2, label, NULL);
/* unable to make a name at all? then quit */
if (iname == NULL)
break;
@@ -442,7 +442,7 @@ CreateIndexName(char *tname, char *cname, char *label, List *indices)
pfree(iname);
iname = NULL;
pass++;
sprintf(name2, "%s_%d", cname, (pass + 1));
sprintf(name2, "%s_%d", column_name, (pass + 1));
}
return (iname);
@@ -700,7 +700,7 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
iparam->name = strcpy(palloc(strlen(column->colname) + 1), column->colname);
iparam->args = NIL;
iparam->class = NULL;
iparam->tname = NULL;
iparam->typename = NULL;
index->indexParams = lappend(index->indexParams, iparam);
if (index->idxname == NULL)

File diff suppressed because it is too large Load Diff

View File

@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.26 1998/08/25 21:36:53 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.27 1998/08/26 05:22:49 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -295,7 +295,7 @@ Oid param_type(int t); /* used in parse_expr.c */
NEW, NONE, NOTHING, NOTNULL, OIDS, OPERATOR, PROCEDURAL,
RECIPE, RENAME, RESET, RETURNS, ROW, RULE,
SEQUENCE, SERIAL, SETOF, SHOW, START, STATEMENT, STDIN, STDOUT, TRUSTED,
VACUUM, VERBOSE, VERSION, ENCODING
VACUUM, VERBOSE, VERSION, ENCODING, UNLISTEN
/* Keywords (obsolete; retain through next version for parser - thomas 1997-12-04) */
%token ARCHIVE
@@ -1697,7 +1697,7 @@ func_index: func_name '(' name_list ')' opt_type opt_class
$$->name = $1;
$$->args = $3;
$$->class = $6;
$$->tname = $5;
$$->typename = $5;
}
;
@@ -1707,7 +1707,7 @@ index_elem: attr_name opt_type opt_class
$$->name = $1;
$$->args = NIL;
$$->class = $3;
$$->tname = $2;
$$->typename = $2;
}
;

View File

@@ -201,34 +201,36 @@ typedef union
#define ROW 427
#define RULE 428
#define SEQUENCE 429
#define SETOF 430
#define SHOW 431
#define START 432
#define STATEMENT 433
#define STDIN 434
#define STDOUT 435
#define TRUSTED 436
#define VACUUM 437
#define VERBOSE 438
#define VERSION 439
#define ENCODING 440
#define ARCHIVE 441
#define PASSWORD 442
#define CREATEDB 443
#define NOCREATEDB 444
#define CREATEUSER 445
#define NOCREATEUSER 446
#define VALID 447
#define UNTIL 448
#define IDENT 449
#define SCONST 450
#define Op 451
#define ICONST 452
#define PARAM 453
#define FCONST 454
#define OP 455
#define UMINUS 456
#define TYPECAST 457
#define SERIAL 430
#define SETOF 431
#define SHOW 432
#define START 433
#define STATEMENT 434
#define STDIN 435
#define STDOUT 436
#define TRUSTED 437
#define VACUUM 438
#define VERBOSE 439
#define VERSION 440
#define ENCODING 441
#define UNLISTEN 442
#define ARCHIVE 443
#define PASSWORD 444
#define CREATEDB 445
#define NOCREATEDB 446
#define CREATEUSER 447
#define NOCREATEUSER 448
#define VALID 449
#define UNTIL 450
#define IDENT 451
#define SCONST 452
#define Op 453
#define ICONST 454
#define PARAM 455
#define FCONST 456
#define OP 457
#define UMINUS 458
#define TYPECAST 459
extern YYSTYPE yylval;