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

Commit8338cc0

Browse files
committed
Remove the last traces of datatypes datetime and timespan.
1 parent53cedca commit8338cc0

File tree

10 files changed

+15
-28
lines changed

10 files changed

+15
-28
lines changed

‎contrib/oracle/Ora2Pg.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,8 +1290,8 @@ sub _sql_type
12901290
'VARCHAR2'=>'varchar',
12911291
'NVARCHAR2'=>'varchar',
12921292
# The DATE data type is used to store the date and time information.
1293-
# Pg typedatetime should match all needs
1294-
'DATE'=>'datetime',
1293+
# Pg typetimestamp should match all needs
1294+
'DATE'=>'timestamp',
12951295
# Type LONG is like VARCHAR2 but with up to 2Gb.
12961296
# PG type text should match all needs or if you want you could use blob
12971297
'LONG'=>'text',# Character data of variable length

‎contrib/spi/moddatetime.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ DROP TABLE mdt;
33
CREATE TABLE mdt (
44
idint4,
55
idesctext,
6-
moddatedatetime DEFAULTdatetime(CURRENT_TIMESTAMP) NOT NULL
6+
moddatetimestamp DEFAULT CURRENT_TIMESTAMP NOT NULL
77
);
88

99
CREATE TRIGGER mdt_moddatetime

‎contrib/spi/refint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ check_foreign_key(PG_FUNCTION_ARGS)
450450

451451
if ((strcmp(type,"text")&&strcmp(type,"varchar")&&
452452
strcmp(type,"char")&&strcmp(type,"bpchar")&&
453-
strcmp(type,"date")&&strcmp(type,"datetime"))==0)
453+
strcmp(type,"date")&&strcmp(type,"timestamp"))==0)
454454
is_char_type=1;
455455
#ifdefDEBUG_QUERY
456456
elog(DEBUG3,"Check_foreign_key Debug value %s type %s %d",

‎contrib/spi/timetravel.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ insert into tttest(price_id, price_val) values (2, 2);
1818
insert into tttest(price_id, price_val,price_off) values (3, 3, 'infinity');
1919

2020
insert into tttest(price_id, price_val,price_off) values (3, 3,
21-
datetime_abstime(datetime_mi_span('now','100')));
21+
abstime('now'::timestamp -'100 days'::interval));
2222
insert into tttest(price_id, price_val,price_on) values (3, 3, 'infinity');
2323

2424
select * from tttest;

‎contrib/tips/README.apachelog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ not as a finished idea.
6969
--- apachelog.sql : ---
7070

7171
drop table access;
72-
CREATE TABLE access (host char(200), ident char(200), authuser char(200), accdatedatetime, request char(500), ttime int2, status int2, bytes int4) archive = none;
72+
CREATE TABLE access (host char(200), ident char(200), authuser char(200), accdatetimestamp, request char(500), ttime int2, status int2, bytes int4) archive = none;
7373
grant all on access to nobody;
7474

7575
--- httpconf.txt: ---

‎doc/src/sgml/datatype.sgml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.91 2002/04/25 20:14:43 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.92 2002/05/03 04:11:07 tgl Exp $
33
-->
44

55
<chapter id="datatype">
@@ -1340,24 +1340,10 @@ SELECT b, char_length(b) FROM test2;
13401340
outside that range are in <acronym>UTC</acronym>.
13411341
</para>
13421342

1343-
<para>
1344-
To ensure an upgrade path from versions of
1345-
<productname>PostgreSQL</productname> earlier than 7.0,
1346-
we recognize <type>datetime</type>
1347-
(equivalent to <type>timestamp</type>) and
1348-
<type>timespan</type> (equivalent to <type>interval</type>).
1349-
These types are
1350-
now restricted to having an
1351-
implicit translation to <type>timestamp</type> and
1352-
<type>interval</type>, and
1353-
support for these will be removed in the next release of
1354-
<productname>PostgreSQL</productname> (likely named 7.3).
1355-
</para>
1356-
13571343
<para>
13581344
The types <type>abstime</type>
13591345
and <type>reltime</type> are lower precision types which are used internally.
1360-
You are discouraged from usingany ofthese types in new
1346+
You are discouraged from using these types in new
13611347
applications and are encouraged to move any old
13621348
ones over when appropriate. Any or all of these internal types
13631349
might disappear in a future release.

‎doc/src/sgml/plsql.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/plsql.sgml,v 2.57 2002/04/09 03:08:25 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/plsql.sgml,v 2.58 2002/05/03 04:11:07 tgl Exp $
33
-->
44

55
<chapter id="plpgsql">
@@ -2744,7 +2744,7 @@ show errors
27442744
package would become something like this:
27452745

27462746
<programlisting>
2747-
CREATE FUNCTION acs__add_user(INTEGER,INTEGER,VARCHAR,DATETIME,INTEGER,INTEGER,...)
2747+
CREATE FUNCTION acs__add_user(INTEGER,INTEGER,VARCHAR,TIMESTAMP,INTEGER,INTEGER,...)
27482748
RETURNS INTEGER AS '
27492749
DECLARE
27502750
user_id ALIAS FOR $1;

‎doc/src/sgml/release.sgml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.133 2002/04/18 20:01:08 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.134 2002/05/03 04:11:07 tgl Exp $
33
-->
44

55
<appendix id="release">
@@ -24,6 +24,7 @@ CDATA means the content is "SGML-free", so you can write without
2424
worries about funny characters.
2525
-->
2626
<literallayout><![CDATA[
27+
The last vestiges of support for type names datetime and timespan are gone; use timestamp and interval instead
2728
Rule names are now per-relation, not global; DROP RULE and COMMENT ON RULE syntax changes accordingly
2829
Readline and Zlib are now required by default and must be turned off explicitly if their use is not desired
2930
Define a third class of function volatility to allow indexscans in more cases

‎src/backend/catalog/heap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.197 2002/04/27 21:24:33 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.198 2002/05/03 04:11:08 tgl Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -1777,7 +1777,7 @@ cookDefault(ParseState *pstate,
17771777
* column's type. We store the expression without coercion,
17781778
* however, to avoid premature coercion in cases like
17791779
*
1780-
* CREATE TABLE tbl (flddatetime DEFAULT 'now'::text);
1780+
* CREATE TABLE tbl (fldtimestamp DEFAULT 'now'::text);
17811781
*
17821782
* NB: this should match the code in optimizer/prep/preptlist.c that
17831783
* will actually do the coercion, to ensure we don't accept an

‎src/interfaces/python/pgdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def __cmp__(self, other):
415415

416416
# this may be problematic as type are quite different ... I hope it won't hurt
417417
DATETIME=pgdbType(
418-
'abstime','reltime','tinterval','date','time','timespan','timestamp'
418+
'abstime','reltime','tinterval','date','time','timespan','timestamp','timestamptz','interval'
419419
)
420420

421421
# OIDs are used for everything (types, tables, BLOBs, rows, ...). This may cause

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp