Skip site navigation (1) Skip section navigation (2)

Re: BUG #5884: i cant select entire array values

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: yashar ebrahimpoor <ebrahimpoor(dot)yashar(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5884: i cant select entire array values
Date: 2011-02-14 15:22:08
Message-ID: AANLkTinU=EGg9z3cP4c01+kX1f-Y-COkS4FV2Zz_W4Wb@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Hello

2011/2/14 yashar ebrahimpoor <ebrahimpoor(dot)yashar(at)gmail(dot)com>:
>
> The following bug has been logged online:
>
> Bug reference:      5884
> Logged by:          yashar ebrahimpoor
> Email address:      ebrahimpoor(dot)yashar(at)gmail(dot)com
> PostgreSQL version: 8.4.7
> Operating system:   centos 5.5
> Description:        i cant select entire array values
> Details:
>
> CREATE TABLE "flight"."FlightList" (
>  "FlighID" INTEGER DEFAULT nextval('flight.flist_flightid_seq'::regclass)
> NOT NULL,
>  "FlightDate" DATE[] NOT NULL,
>  "FlightNum" VARCHAR[] NOT NULL,
>  "FlightTime" TIME WITHOUT TIME ZONE[] NOT NULL,
>  "FlightDuration" VARCHAR[] NOT NULL,
>  CONSTRAINT "FlightList_pkey" PRIMARY KEY("FlighID")
> ) WITH OIDS;
>
> after create this table, insert some data
> INSERT INTO
> "flight"."FlightList"("FlightDate","FlightNum","FlightTime","FlightDuration"
> )
> VALUES(ARRAY["date"('2011-10-10'),"date"('2011-10-15')],
> ARRAY['230','231'],
> ARRAY["time"('21:00:00'),"time"('16:25:00')],
> ARRAY['2:30','2:35']);
>
> now i want to execute this query:
> select "FlightNum[0]" FROM flight."FlightList";
>
> return this error:
>
> ERROR:  column "FlightNum[0]" does not exist
> LINE 1: select "FlightNum[0]" FROM flight."FlightList"
>

please, try to SELECT "FlightNum"[0] FROM FlightList

Pavel Stehule

p.s. Using a case sensitive identifiers isn't good idea






> please help to resolve this problem.
> thank you so much.
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>

In response to

Responses

pgsql-bugs by date

Next:From: Kevin GrittnerDate: 2011-02-14 15:55:33
Subject: Re: BUG #5884: i cant select entire array values
Previous:From: Tatsuhito KasaharaDate: 2011-02-14 12:55:56
Subject: Re: Array issue....

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group