'VARCHAR2' => 'varchar',
'NVARCHAR2' => 'varchar',
# The DATE data type is used to store the date and time information.
- # Pg type datetime should match all needs
- 'DATE' => 'datetime',
+ # Pg type timestamp should match all needs
+ 'DATE' => 'timestamp',
# Type LONG is like VARCHAR2 but with up to 2Gb.
# PG type text should match all needs or if you want you could use blob
'LONG' => 'text', # Character data of variable length
CREATE TABLE mdt (
id int4,
idesc text,
- moddate datetime DEFAULT datetime(CURRENT_TIMESTAMP) NOT NULL
+ moddate timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL
);
CREATE TRIGGER mdt_moddatetime
if ((strcmp(type, "text") && strcmp(type, "varchar") &&
strcmp(type, "char") && strcmp(type, "bpchar") &&
- strcmp(type, "date") && strcmp(type, "datetime")) == 0)
+ strcmp(type, "date") && strcmp(type, "timestamp")) == 0)
is_char_type = 1;
#ifdef DEBUG_QUERY
elog(DEBUG3, "Check_foreign_key Debug value %s type %s %d",
insert into tttest(price_id, price_val,price_off) values (3, 3, 'infinity');
insert into tttest(price_id, price_val,price_off) values (3, 3,
- datetime_abstime(datetime_mi_span('now', '100')));
+ abstime('now'::timestamp - '100 days'::interval));
insert into tttest(price_id, price_val,price_on) values (3, 3, 'infinity');
select * from tttest;
--- apachelog.sql : ---
drop table access;
-CREATE TABLE access (host char(200), ident char(200), authuser char(200), accdate datetime, request char(500), ttime int2, status int2, bytes int4) archive = none;
+CREATE TABLE access (host char(200), ident char(200), authuser char(200), accdate timestamp, request char(500), ttime int2, status int2, bytes int4) archive = none;
grant all on access to nobody;
--- httpconf.txt: ---
outside that range are in
UTC.
- To ensure an upgrade path from versions of
-
PostgreSQL earlier than 7.0,
- we recognize datetime
- (equivalent to timestamp) and
- timespan (equivalent to interval).
- These types are
- now restricted to having an
- implicit translation to timestamp and
- interval, and
- support for these will be removed in the next release of
-
PostgreSQL (likely named 7.3).
-
-
The types abstime
and reltime are lower precision types which are used internally.
- You are discouraged from using any of these types in new
+ You are discouraged from using these types in new
applications and are encouraged to move any old
ones over when appropriate. Any or all of these internal types
might disappear in a future release.
package would become something like this:
-CREATE FUNCTION acs__add_user(INTEGER,INTEGER,VARCHAR,DATETIME,INTEGER,INTEGER,...)
+CREATE FUNCTION acs__add_user(INTEGER,INTEGER,VARCHAR,TIMESTAMP,INTEGER,INTEGER,...)
RETURNS INTEGER AS '
DECLARE
user_id ALIAS FOR $1;
worries about funny characters.
-->
+The last vestiges of support for type names datetime and timespan are gone; use timestamp and interval instead
Rule names are now per-relation, not global; DROP RULE and COMMENT ON RULE syntax changes accordingly
Readline and Zlib are now required by default and must be turned off explicitly if their use is not desired
Define a third class of function volatility to allow indexscans in more cases
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.197 2002/04/27 21:24:33 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.198 2002/05/03 04:11:08 tgl Exp $
*
*
* INTERFACE ROUTINES
* column's type. We store the expression without coercion,
* however, to avoid premature coercion in cases like
*
- * CREATE TABLE tbl (fld datetime DEFAULT 'now'::text);
+ * CREATE TABLE tbl (fld timestamp DEFAULT 'now'::text);
*
* NB: this should match the code in optimizer/prep/preptlist.c that
* will actually do the coercion, to ensure we don't accept an
# this may be problematic as type are quite different ... I hope it won't hurt
DATETIME = pgdbType(
- 'abstime', 'reltime', 'tinterval', 'date', 'time', 'timespan', 'timestamp'
+ 'abstime', 'reltime', 'tinterval', 'date', 'time', 'timespan', 'timestamp', 'timestamptz', 'interval'
)
# OIDs are used for everything (types, tables, BLOBs, rows, ...). This may cause