Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit071484c

Browse files
committed
From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] timestamp typeOK, last one. This patch adds an ANSI SQL 'timestamp' type.
1 parent3a7c93e commit071484c

File tree

5 files changed

+36
-8
lines changed

5 files changed

+36
-8
lines changed

‎src/backend/utils/adt/Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for utils/adt
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.5 1997/03/09 20:40:50 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.6 1997/03/12 21:27:03 scrappy Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -20,9 +20,8 @@ CFLAGS+=$(INCLUDE_OPT)
2020
OBJS = acl.o arrayfuncs.o arrayutils.o bool.o char.o chunk.o date.o\
2121
datum.o dt.o filename.o float.o geo_ops.o geo_selfuncs.o int.o\
2222
misc.o nabstime.o name.o not_in.o numutils.o oid.o\
23-
oidname.o oidint2.o oidint4.o oracle_compat.o\
24-
regexp.o regproc.o selfuncs.o\
25-
tid.o varchar.o varlena.o sets.o datetimes.o like.o
23+
oidname.o oidint2.o oidint4.o oracle_compat.o regexp.o regproc.o selfuncs.o\
24+
tid.o varchar.o varlena.o sets.o datetimes.o like.o timestamp.o
2625

2726
all: SUBSYS.o
2827

‎src/include/catalog/pg_operator.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: pg_operator.h,v 1.4 1996/11/14 21:39:11 scrappy Exp $
10+
* $Id: pg_operator.h,v 1.5 1997/03/12 21:27:18 scrappy Exp $
1111
*
1212
* NOTES
1313
* the genbki.sh script reads this file and generates .bki
@@ -463,6 +463,12 @@ DATA(insert OID = 1232 ( "~*" PGUID 0 b t f 1043 25 16 0 1233 0 0 text
463463
DATA(insertOID=1233 ("!~*"PGUID0btf104325160123200texticregexneneqselneqjoinsel ));
464464
DATA(insertOID=1234 ("~*"PGUID0btf104225160123500texticregexeqeqseleqjoinsel ));
465465
DATA(insertOID=1235 ("!~*"PGUID0btf104225160123400texticregexneneqselneqjoinsel ));
466+
DATA(insertOID=1300 ("="PGUID0btt12961296161300130113021302timestampeqeqseleqjoinsel ));
467+
DATA(insertOID=1301 ("<>"PGUID0btf12961296161301130000timestampneneqselneqjoinsel ));
468+
DATA(insertOID=1302 ("<"PGUID0btf12961296161303130500timestampltintltselintltjoinsel ));
469+
DATA(insertOID=1303 (">"PGUID0btf12961296161302130400timestampgtintltselintltjoinsel ));
470+
DATA(insertOID=1304 ("<="PGUID0btf12961296161305130300timestampleintltselintltjoinsel ));
471+
DATA(insertOID=1305 (">="PGUID0btf12961296161304130200timestampgeintltselintltjoinsel ));
466472

467473

468474

‎src/include/catalog/pg_proc.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: pg_proc.h,v 1.8 1997/03/04 05:32:11 scrappy Exp $
9+
* $Id: pg_proc.h,v 1.9 1997/03/12 21:27:28 scrappy Exp $
1010
*
1111
* NOTES
1212
* The script catalog/genbki.sh reads this file and generates .bki
@@ -757,6 +757,15 @@ DATA(insert OID = 1238 ( texticregexeq PGUID 11 f t f 2 f 16 "25 25" 100
757757
DATA(insertOID=1239 (texticregexnePGUID11ftf2f16"25 25"100010foobar ));
758758
DATA(insertOID=1240 (nameicregexeqPGUID11ftf2f16"19 25"10000100foobar ));
759759
DATA(insertOID=1241 (nameicregexnePGUID11ftf2f16"19 25"10000100foobar ));
760+
DATA(insertOID=1297 (timestamp_inPGUID11ftf1f1296"0"10000100foobar ));
761+
DATA(insertOID=1298 (timestamp_outPGUID11ftf1f23"0"10000100foobar ));
762+
DATA(insertOID=1299 (nowPGUID11ftf0f1296"0"10000100foobar ));
763+
DATA(insertOID=1306 (timestampeqPGUID11ftf2f16"1296 1296"10000100foobar ));
764+
DATA(insertOID=1307 (timestampnePGUID11ftf2f16"1296 1296"10000100foobar ));
765+
DATA(insertOID=1308 (timestampltPGUID11ftf2f16"1296 1296"10000100foobar ));
766+
DATA(insertOID=1309 (timestampgtPGUID11ftf2f16"1296 1296"10000100foobar ));
767+
DATA(insertOID=1310 (timestamplePGUID11ftf2f16"1296 1296"10000100foobar ));
768+
DATA(insertOID=1311 (timestampgePGUID11ftf2f16"1296 1296"10000100foobar ));
760769

761770
/* Oracle Compatibility Related Functions - By Edmund Mergl <E.Mergl@bawue.de> */
762771
DATA(insertOID=1260 (lowerPGUID11ftf1f25"25"10000100foobar ));

‎src/include/catalog/pg_type.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: pg_type.h,v 1.7 1997/01/14 01:41:57 momjian Exp $
10+
* $Id: pg_type.h,v 1.8 1997/03/12 21:27:41 scrappy Exp $
1111
*
1212
* NOTES
1313
* the genbki.sh script reads this file and generates .bki
@@ -292,6 +292,8 @@ DATA(insert OID = 1082 ( date PGUID 4 10 t b t \054 0 0 date_in date_out
292292
DATA(insertOID=1083 (timePGUID816fbt \05400time_intime_outtime_intime_outi_null_ ));
293293
DATA(insertOID=1182 (_datePGUID-1-1fbt \05401082array_inarray_outarray_inarray_outi_null_ ));
294294
DATA(insertOID=1183 (_timePGUID-1-1fbt \05401083array_inarray_outarray_inarray_outd_null_ ));
295+
DATA(insertOID=1296 (timestampPGUID419tbt \05400timestamp_intimestamp_outtimestamp_intimestamp_outi_null_ ));
296+
295297
/*
296298
* prototypes for functions in pg_type.c
297299
*/

‎src/include/utils/builtins.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: builtins.h,v 1.10 1997/03/09 20:41:02 momjian Exp $
9+
* $Id: builtins.h,v 1.11 1997/03/12 21:28:14 scrappy Exp $
1010
*
1111
* NOTES
1212
* This should normally only be included by fmgr.h.
@@ -403,6 +403,18 @@ extern float64 gistnpage(Oid operatorObjectId, Oid indrelid, AttrNumber attribut
403403
/* tid.c */
404404
externItemPointertidin(char*str);
405405
externchar*tidout(ItemPointeritemPtr);
406+
407+
/* timestamp.c */
408+
externint4timestamp_in(char*timestamp_str);
409+
externchar*timestamp_out(int4timestamp);
410+
externint4now(void);
411+
int4timestampeq(int4t1,int4t2);
412+
int4timestampne(int4t1,int4t2);
413+
int4timestamplt(int4t1,int4t2);
414+
int4timestampgt(int4t1,int4t2);
415+
int4timestample(int4t1,int4t2);
416+
int4timestampge(int4t1,int4t2);
417+
406418
/* varchar.c */
407419
externchar*bpcharin(char*s,intdummy,inttyplen);
408420
externchar*bpcharout(char*s);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp