Re: Query (view) question - Mailing list pgadmin-support

From Joris Dobbelsteen
Subject Re: Query (view) question
Date
Msg-id 73427AD314CC364C8DF0FFF9C4D693FF556A@nehemiah.joris2k.local
Whole thread Raw
In response to Query (view) question  (Art Fore <art.fore@comcast.net>)
Responses Re: Query (view) question  (Art Fore <art.fore@comcast.net>)
List pgadmin-support
>-----Original Message-----
>From: pgadmin-support-owner@postgresql.org
>[mailto:pgadmin-support-owner@postgresql.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


pgadmin-support by date:

Previous
From: Art Fore
Date:
Subject: Query (view) question
Next
From: Art Fore
Date:
Subject: Re: Query (view) question