Re: How to enter daterange into a raw? - Mailing list pgadmin-support

From David Johnston
Subject Re: How to enter daterange into a raw?
Date
Msg-id 1375306583678-5765812.post@n5.nabble.com
Whole thread Raw
In response to How to enter daterange into a raw?  (Csanyi Pal <csanyipal@gmail.com>)
Responses Re: How to enter daterange into a raw? - SOLVED  (Csanyi Pal <csanyipal@gmail.com>)
List pgadmin-support
Csanyi Pal wrote
> Hi,
> 
> I have installed PostgreSQL 9.2 on my desktop machine, and
> pgAdmin III version: 1.16.1.
> 
> I'm being creating a new database with daterange type.
> 
> When I'm trying to enter in the 'Edit Data - PostgreSQL' window in the
> first raw a range of data:
> 
> '2013-09-01, 2013-11-01' without quotes, I get error message:
> ERROR:  array value must start with "{" or dimension information
> LINE 1: INSERT INTO public.negyedev(ettol_eddig) VALUES ('2013-09-01...
>                                                          ^
> I want inclusive start and end bounds.
> 
> Well, I dont know how to enter the start data and the end data of the
> range in pgAdmin III?

Not tested with pgAdmin but I would presume entering a valid literal - as
defined here:

http://www.postgresql.org/docs/9.2/interactive/rangetypes.html#RANGETYPES-IO

should work.

Namely you have to tell it what kind of bound you desire by inputting "( or
[" and ") or ]".

No idea why it is trying to convert it to an array though.  Are you positive
you defined the table correctly?  Maybe you should provide the table
definition you are trying to use as well.  You may also want to write a
simple "INSERT INTO table VALUES ('')" to make sure you understand what is
happening without involving pgAdmin.

David J.

  



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/How-to-enter-daterange-into-a-raw-tp5765795p5765812.html
Sent from the PostgreSQL - pgadmin support mailing list archive at Nabble.com.



pgadmin-support by date:

Previous
From: Oli Noname
Date:
Subject: Re: PgAdmin V 1.16.1 Error - Comment on database
Next
From: Csanyi Pal
Date:
Subject: Re: How to enter daterange into a raw? - SOLVED