pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problems to be solved as soon as possible
4+ messages / 4 participants
[nested] [flat]

* Problems to be solved as soon as possible
@ 2003-09-26 11:13 The Guardian <theguardian@vsnl.net>
  2003-09-29 18:15 ` Re: Problems to be solved as soon as possible Tomasz Myrta <jasiek@klaster.net>
  2003-09-29 19:20 ` Re: Problems to be solved as soon as possible Josh Berkus <josh@agliodbs.com>
  0 siblings, 2 replies; 4+ messages in thread

From: The Guardian @ 2003-09-26 11:13 UTC (permalink / raw)
  To: pgsql-sql


Dear Support Team,
	We are hosting a website which was originally designed in some version of
Debian Linux and having PostgreSQL as back end. The developers have made a
script which creates several tables in the database. Some of the tables have
datatypes like DateTime. When i run those scripts in PostgreSQL of Red hat
Linux 7.2, they run perfectly. But when i run the same scrips in PostgreSQL
of Redhat Linux 9.0, it displays an error message of "data type DATETIME not
found."
	So can you please guide me what changes i have to make in the script of
creating tables at my end as a customer so that my application runs
smoothly.

Regards,
The Guardian.
Ph: 31074723 / 32511869.
Website: www.guardianindia.com
Email:   theguardian@vsnl.net





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Problems to be solved as soon as possible
  2003-09-26 11:13 Problems to be solved as soon as possible The Guardian <theguardian@vsnl.net>
@ 2003-09-29 18:15 ` Tomasz Myrta <jasiek@klaster.net>
  2003-09-29 19:12   ` Re: Problems to be solved as soon as possible Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 4+ messages in thread

From: Tomasz Myrta @ 2003-09-29 18:15 UTC (permalink / raw)
  To: The Guardian <theguardian@vsnl.net>; +Cc: pgsql-sql

> Dear Support Team,
> 	We are hosting a website which was originally designed in some version of
> Debian Linux and having PostgreSQL as back end. The developers have made a
> script which creates several tables in the database. Some of the tables have
> datatypes like DateTime. When i run those scripts in PostgreSQL of Red hat
> Linux 7.2, they run perfectly. But when i run the same scrips in PostgreSQL
> of Redhat Linux 9.0, it displays an error message of "data type DATETIME not
> found."
> 	So can you please guide me what changes i have to make in the script of
> creating tables at my end as a customer so that my application runs
> smoothly.

It looks like Postgresql problem, not a Redhat problem. Probably 
datetime is some not longer supported datatype. General date and time 
datatype is "timestamp". Try to change your "datetime" to "timestamp" - 
it should help. Anyway, what versions your Postgresql rpm's have?

Regards,
Tomasz Myrta




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Problems to be solved as soon as possible
  2003-09-26 11:13 Problems to be solved as soon as possible The Guardian <theguardian@vsnl.net>
  2003-09-29 18:15 ` Re: Problems to be solved as soon as possible Tomasz Myrta <jasiek@klaster.net>
@ 2003-09-29 19:12   ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2003-09-29 19:12 UTC (permalink / raw)
  To: Tomasz Myrta <jasiek@klaster.net>; +Cc: The Guardian <theguardian@vsnl.net>; pgsql-sql

Tomasz Myrta <jasiek@klaster.net> writes:
>> datatypes like DateTime. When i run those scripts in PostgreSQL of Red hat
>> Linux 7.2, they run perfectly. But when i run the same scrips in PostgreSQL
>> of Redhat Linux 9.0, it displays an error message of "data type DATETIME not
>> found."

> It looks like Postgresql problem, not a Redhat problem. Probably 
> datetime is some not longer supported datatype.

Yes, "datetime" is an ancient name for what we now call by the
SQL-standard name "timestamp with time zone".

If changing to the standard name makes for too many changes in your
application code, you could use a domain as a kind of type alias:

	create domain datetime as timestamp with time zone;

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Problems to be solved as soon as possible
  2003-09-26 11:13 Problems to be solved as soon as possible The Guardian <theguardian@vsnl.net>
@ 2003-09-29 19:20 ` Josh Berkus <josh@agliodbs.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Josh Berkus @ 2003-09-29 19:20 UTC (permalink / raw)
  To: The Guardian <theguardian@vsnl.net>; pgsql-sql

"The Guardian",

> Dear Support Team,

We are not a "support team".  We are your fellow PostgreSQL users, and are 
helping you out of our personal generosity and desire to promote Postgres 
use.   Nobody on this list is paid to answer your question.

You are expected to "pay" for this support by, in turn, helping other users 
who are less experienced than you.   This peer-to-peer help strategy has kept 
PostgreSQL going for 16 years, and is often faster than traditional 
commercial support.   However, you should remember that the people you are 
talking to are not paid support staff, and remember that the people answering 
your questions are doing you a favor.

> 	We are hosting a website which was originally designed in some version of
> Debian Linux and having PostgreSQL as back end. The developers have made a
> script which creates several tables in the database. Some of the tables have
> datatypes like DateTime. When i run those scripts in PostgreSQL of Red hat
> Linux 7.2, they run perfectly. But when i run the same scrips in PostgreSQL
> of Redhat Linux 9.0, it displays an error message of "data type DATETIME not
> found."

	The DATETIME data type was included in PostgreSQL versions 6.5 to 7.1 (as I 
recall) in order to provide compatibility with certain commercial database 
products.  Before 7.2, the core developers decided that it was silly to 
maintain support for a data type which was not SQL-standard just for 
compatibility with 2 commercial databases, and so support for DATETIME was 
phased out over the next two versions.

	You can fix your scripts by doing a search-and-replace on DATETIME and 
replacing it with TIMESTAMP, which provides the same functionality.

-- 
-Josh Berkus
 Aglio Database Solutions
 San Francisco




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2003-09-29 19:20 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-09-26 11:13 Problems to be solved as soon as possible The Guardian <theguardian@vsnl.net>
2003-09-29 18:15 ` Tomasz Myrta <jasiek@klaster.net>
2003-09-29 19:12   ` Tom Lane <tgl@sss.pgh.pa.us>
2003-09-29 19:20 ` Josh Berkus <josh@agliodbs.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox