Re: Query (view) question

From: "Joris Dobbelsteen" <Joris(at)familiedobbelsteen(dot)nl>
To: <art(dot)fore(at)comcast(dot)net>
Cc: "Pgadmin-Support" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Query (view) question
Date: 2007-02-12 11:00:35
Message-ID: 73427AD314CC364C8DF0FFF9C4D693FF556A@nehemiah.joris2k.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

>-----Original Message-----
>From: pgadmin-support-owner(at)postgresql(dot)org
>[mailto:pgadmin-support-owner(at)postgresql(dot)org] On Behalf Of Art Fore
>Sent: maandag 12 februari 2007 11:40
>To: Pgadmin-Support
>Subject: [pgadmin-support] Query (view) question
>
[snip]
>I tried this as a view with pgadmin with slight mods, This one
>below works
>
>SELECT "ALL_PARTS"."PARTNUM", "ALL_PARTS"."Datasheet",
>"ALL_PARTS"."Outline", "ALL_PARTS"."Footprint"
> FROM "ALL_PARTS" "ALL_PARTS"
> WHERE "ALL_PARTS"."PARTNUM"::text ~~ '021-%'::text;
>
>But, if I do the following
>
>SELECT "ALL_PARTS"."PARTNUM", "datasheet_address","sheet" ||
>"ALL_PARTS"."Datasheet", "ALL_PARTS"."Outline", "ALL_PARTS"."Footprint"
> FROM "ALL_PARTS" "ALL_PARTS", "datasheet_address"
>"datasheet_address"
> WHERE "ALL_PARTS"."PARTNUM"::text ~~ '021-%'::text;

Notice the comma between "datasheet_address","sheet". I doesn't seem
intentional.

Try that, otherwise look up the column types and try casting them.

With parsers (especially compilers) there seems to be a relation between
clariness of the error messages and how widespread the software is.
For Postgres there are three options:
1) Its not widespread, justifying the error messages
2) Its error messages indicate its not widespread
3) It has defied the odds.

Slight off-topic note:
Furthermore, you can get rid of all the ugly " if you name everything
with only lowercase letters. When not quoting the names Postgres seems
to do some name mangling (convert to lowercase and search for it in a
case-sensative way with the unconverted names).

- Joris

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Art Fore 2007-02-12 12:04:58 Re: Query (view) question
Previous Message Art Fore 2007-02-12 10:40:08 Query (view) question