Fix for typo in gram.y

This commit is contained in:
Bruce Momjian 1999-01-18 06:32:27 +00:00
parent be321b7488
commit fd7b963316
4 changed files with 108 additions and 92 deletions

View File

@ -4,7 +4,7 @@
# Makefile for catalog # Makefile for catalog
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.15 1999/01/17 06:18:14 momjian Exp $ # $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.16 1999/01/18 06:32:24 momjian Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -57,8 +57,7 @@ depend dep:
clean: clean:
rm -f SUBSYS.o $(OBJS) global1.bki.source local1_template1.bki.source \ rm -f SUBSYS.o $(OBJS) global1.bki.source local1_template1.bki.source \
global1.description local1_template1.description \ global1.description local1_template1.description
$(GENBKI)
ifeq (depend,$(wildcard depend)) ifeq (depend,$(wildcard depend))
include depend include depend

View File

@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.43 1999/01/18 00:09:51 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.44 1999/01/18 06:32:25 momjian Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
@ -2794,7 +2794,7 @@ SelectStmt: select_w_o_sort sort_clause for_update_clause
/* finally attach the sort clause */ /* finally attach the sort clause */
first_select->sortClause = $2; first_select->sortClause = $2;
first_select>forUpdate = $3; first_select->forUpdate = $3;
$$ = (Node *)first_select; $$ = (Node *)first_select;
} }
if ((SelectStmt *)$$)->forUpdate != NULL) if ((SelectStmt *)$$)->forUpdate != NULL)

View File

@ -21,7 +21,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.98 1999/01/17 06:19:05 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.99 1999/01/18 06:32:26 momjian Exp $
* *
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
* *
@ -491,7 +491,6 @@ prompt_for_password(char *username, char *password)
#ifdef HAVE_TERMIOS_H #ifdef HAVE_TERMIOS_H
struct termios t_orig, struct termios t_orig,
t; t;
#endif #endif
printf("Username: "); printf("Username: ");
@ -2602,16 +2601,25 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
j, j,
k; k;
char q[MAXQUERYLEN]; char q[MAXQUERYLEN];
char *serialSeq = NULL; /* implicit sequence name created by SERIAL datatype */
const char *serialSeqSuffix = "_id_seq"; /* suffix for implicit SERIAL sequences */
char **parentRels; /* list of names of parent relations */ char **parentRels; /* list of names of parent relations */
int numParents; int numParents;
int actual_atts; /* number of attrs in this CREATE statment */ int actual_atts; /* number of attrs in this CREATE statment */
/* First - dump SEQUENCEs */ /* First - dump SEQUENCEs */
if (tablename)
{
serialSeq = malloc (strlen (tablename) + strlen (serialSeqSuffix) + 1);
strcpy (serialSeq, tablename);
strcat (serialSeq, serialSeqSuffix);
}
for (i = 0; i < numTables; i++) for (i = 0; i < numTables; i++)
{ {
if (!(tblinfo[i].sequence)) if (!(tblinfo[i].sequence))
continue; continue;
if (!tablename || (!strcmp(tblinfo[i].relname, tablename))) if (!tablename || (!strcmp(tblinfo[i].relname, tablename))
|| (serialSeq && !strcmp(tblinfo[i].relname,serialSeq)))
{ {
becomeUser(fout, tblinfo[i].usename); becomeUser(fout, tblinfo[i].usename);
dumpSequence(fout, tblinfo[i]); dumpSequence(fout, tblinfo[i]);
@ -2619,6 +2627,8 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
dumpACL(fout, tblinfo[i]); dumpACL(fout, tblinfo[i]);
} }
} }
if (tablename)
free (serialSeq);
for (i = 0; i < numTables; i++) for (i = 0; i < numTables; i++)
{ {

View File

@ -28,6 +28,13 @@ ZeroSecs
@ 0 @ 0
(1 row) (1 row)
QUERY: SET DateStyle = 'Postgres,noneuropean';
QUERY: SELECT datetime('1994-01-01', '11:00') AS "Jan_01_1994_11am";
Jan_01_1994_11am
----------------------------
Sat Jan 01 11:00:00 1994 PST
(1 row)
QUERY: CREATE TABLE DATETIME_TBL( d1 datetime); QUERY: CREATE TABLE DATETIME_TBL( d1 datetime);
QUERY: INSERT INTO DATETIME_TBL VALUES ('current'); QUERY: INSERT INTO DATETIME_TBL VALUES ('current');
QUERY: INSERT INTO DATETIME_TBL VALUES ('today'); QUERY: INSERT INTO DATETIME_TBL VALUES ('today');