Re: How to enter daterange into a raw?

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: Re: How to enter daterange into a raw?
Date: 2013-07-31 21:36:23
Message-ID: 1375306583678-5765812.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Oli Noname 2013-08-01 06:40:08 Re: PgAdmin V 1.16.1 Error - Comment on database
Previous Message Csanyi Pal 2013-07-31 18:24:57 How to enter daterange into a raw?