Re: Query (view) question

Поиск
Список
Период
Сортировка
От Joris Dobbelsteen
Тема Re: Query (view) question
Дата
Msg-id 73427AD314CC364C8DF0FFF9C4D693FF556A@nehemiah.joris2k.local
обсуждение исходный текст
Ответ на Query (view) question  (Art Fore <art.fore@comcast.net>)
Ответы Re: Query (view) question  (Art Fore <art.fore@comcast.net>)
Список 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 по дате отправления:

Предыдущее
От: Art Fore
Дата:
Сообщение: Query (view) question
Следующее
От: Art Fore
Дата:
Сообщение: Re: Query (view) question