Thread: Date column types
I am curious as to why in PGAdmin if I try to set up a column with datatype date it gets converted to a timestamp. Does Date really not exist despite what the documentation says.
FarleyIt's not called losing your train of thought......
No, I'm sorry. It is called that. - Anonymoous... probably.
On Wed, 2013-04-17 at 10:56 -0400, Farley Carter wrote: > I am curious as to why in PGAdmin if I try to set up a column with datatype > date it gets converted to a timestamp. Does Date really not exist despite > what the documentation says. > Can you explain a little more what you do? I tried to add a new column of type "date", and I have "date" afterwards in the SQL pane. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
It shows it in the sql pane. But when you run it and check the new column after it is added then it is a timestamp. I tried it both in pgadmin II and running it from sql outside pgadmin.
It's not called losing your train of thought......
No, I'm sorry. It is called that. - Anonymoous... probably.
On 18 April 2013 16:30, Guillaume Lelarge <guillaume@lelarge.info> wrote:
On Wed, 2013-04-17 at 10:56 -0400, Farley Carter wrote:Can you explain a little more what you do? I tried to add a new column
> I am curious as to why in PGAdmin if I try to set up a column with datatype
> date it gets converted to a timestamp. Does Date really not exist despite
> what the documentation says.
>
of type "date", and I have "date" afterwards in the SQL pane.
--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com
On Thu, 2013-04-18 at 16:52 -0400, Farley Carter wrote: > It shows it in the sql pane. But when you run it and check the new column > after it is added then it is a timestamp. I tried it both in pgadmin II and > running it from sql outside pgadmin. > No, I meant all the actions that give you that result (right click on this menu, choose the item, wrote this in this textbox, etc...). Everything that could help me reproduce it. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
Interesting in trying to produce what you wanted. (I was going to avoid saying "try anyway to create a table with a column of type date") I was able to create a table of as described below with a column of type date on my home computer. And it worked correctly. So I went back to my work computer and it created a timestamp as opposed to a date. The difference I have found so far is that at work I have 9.2 postgres and at home I am using 9.1
Any ideas?
Go into pgadmin II open your database. Right click on 'Tables'.
CREATE TABLE public."Test"
(
testdate date
)
WITH (
OIDS = FALSE
)
;
Click the 'OK' button
Right click on the new table 'test'
It's not called losing your train of thought......
No, I'm sorry. It is called that. - Anonymoous... probably.
On 23 April 2013 15:11, Guillaume Lelarge <guillaume@lelarge.info> wrote:
On Thu, 2013-04-18 at 16:52 -0400, Farley Carter wrote:No, I meant all the actions that give you that result (right click on
> It shows it in the sql pane. But when you run it and check the new column
> after it is added then it is a timestamp. I tried it both in pgadmin II and
> running it from sql outside pgadmin.
>
this menu, choose the item, wrote this in this textbox, etc...).
Everything that could help me reproduce it.