pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #5884: i cant select entire array values
4+ messages / 3 participants
[nested] [flat]

* BUG #5884: i cant select entire array values
@ 2011-02-14 12:55 yashar ebrahimpoor <ebrahimpoor.yashar@gmail.com>
  2011-02-14 15:22 ` Re: BUG #5884: i cant select entire array values Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: yashar ebrahimpoor @ 2011-02-14 12:55 UTC (permalink / raw)
  To: pgsql-bugs


The following bug has been logged online:

Bug reference:      5884
Logged by:          yashar ebrahimpoor
Email address:      ebrahimpoor.yashar@gmail.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 help to resolve this problem.
thank you so much.



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

* Re: BUG #5884: i cant select entire array values
  2011-02-14 12:55 BUG #5884: i cant select entire array values yashar ebrahimpoor <ebrahimpoor.yashar@gmail.com>
@ 2011-02-14 15:22 ` Pavel Stehule <pavel.stehule@gmail.com>
  2011-02-14 15:55   ` Re: BUG #5884: i cant select entire array values Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 1 reply; 4+ messages in thread

From: Pavel Stehule @ 2011-02-14 15:22 UTC (permalink / raw)
  To: yashar ebrahimpoor <ebrahimpoor.yashar@gmail.com>; +Cc: pgsql-bugs

Hello

2011/2/14 yashar ebrahimpoor <ebrahimpoor.yashar@gmail.com>:
>
> The following bug has been logged online:
>
> Bug reference:      5884
> Logged by:          yashar ebrahimpoor
> Email address:      ebrahimpoor.yashar@gmail.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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>



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

* Re: BUG #5884: i cant select entire array values
  2011-02-14 12:55 BUG #5884: i cant select entire array values yashar ebrahimpoor <ebrahimpoor.yashar@gmail.com>
  2011-02-14 15:22 ` Re: BUG #5884: i cant select entire array values Pavel Stehule <pavel.stehule@gmail.com>
@ 2011-02-14 15:55   ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2011-02-14 17:43     ` Re: BUG #5884: i cant select entire array values Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Kevin Grittner @ 2011-02-14 15:55 UTC (permalink / raw)
  To: yashar ebrahimpoor <ebrahimpoor.yashar@gmail.com>; Pavel Stehule <pavel.stehule@gmail.com>; +Cc: pgsql-bugs

Pavel Stehule <pavel.stehule@gmail.com> wrote:
 
> p.s. Using a case sensitive identifiers isn't good idea
 
Is there any reason for that assertion besides the need to
consistently quote them?
 
-Kevin



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

* Re: BUG #5884: i cant select entire array values
  2011-02-14 12:55 BUG #5884: i cant select entire array values yashar ebrahimpoor <ebrahimpoor.yashar@gmail.com>
  2011-02-14 15:22 ` Re: BUG #5884: i cant select entire array values Pavel Stehule <pavel.stehule@gmail.com>
  2011-02-14 15:55   ` Re: BUG #5884: i cant select entire array values Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2011-02-14 17:43     ` Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Pavel Stehule @ 2011-02-14 17:43 UTC (permalink / raw)
  To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: yashar ebrahimpoor <ebrahimpoor.yashar@gmail.com>; pgsql-bugs

2011/2/14 Kevin Grittner <Kevin.Grittner@wicourts.gov>:
> Pavel Stehule <pavel.stehule@gmail.com> wrote:
>
>> p.s. Using a case sensitive identifiers isn't good idea
>
> Is there any reason for that assertion besides the need to
> consistently quote them?
>

readability - and when you are started quoting, then you have to use
quotes everywhere.

Readability is subjective argument, I know.

Pavel




> -Kevin
>



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


end of thread, other threads:[~2011-02-14 17:43 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-02-14 12:55 BUG #5884: i cant select entire array values yashar ebrahimpoor <ebrahimpoor.yashar@gmail.com>
2011-02-14 15:22 ` Pavel Stehule <pavel.stehule@gmail.com>
2011-02-14 15:55   ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-02-14 17:43     ` Pavel Stehule <pavel.stehule@gmail.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