Problems changing a view

Поиск
Список
Период
Сортировка
От Aren Cambre
Тема Problems changing a view
Дата
Msg-id CAA1mBrrwzbPmdhtvS9X3EwCVB04huhwmX0ZQGt3gAU9Fb=aqgw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Problems changing a view  (Dave Page <dpage@pgadmin.org>)
Список pgadmin-support
If I change this view:
 SELECT dallas_rlc_locations.location_code, count(dallas_rlc."CitationId") AS count, dallas_rlc_locations.location, dallas_rlc_locations.the_geom
   FROM raw.dallas_rlc_locations
   LEFT JOIN raw.dallas_rlc ON dallas_rlc."Loc Code" = dallas_rlc_locations.location_code
  WHERE dallas_rlc."CitationId" IS NOT NULL
  GROUP BY dallas_rlc_locations.location, dallas_rlc_locations.location_code, dallas_rlc_locations.the_geom;

...to this:
 SELECT count(dallas_rlc."CitationId") AS count, dallas_rlc_locations.location_code, dallas_rlc_locations.location, dallas_rlc_locations.the_geom
   FROM raw.dallas_rlc_locations
   LEFT JOIN raw.dallas_rlc ON dallas_rlc."Loc Code" = dallas_rlc_locations.location_code
  WHERE dallas_rlc."CitationId" IS NOT NULL
  GROUP BY dallas_rlc_locations.location, dallas_rlc_locations.location_code, dallas_rlc_locations.the_geom;

(I just reversed the first two fields in the SELECT)

I get this error:
image.png

Huh? A few is impermanent. There's no reason why I can't arbitrarily change the view's underlying code as I wish, as long as the final result is valid SQL. Even if PostgreSQL has some kind of limitation (not alleging it does, just speculating), couldn't pgAdmin help us out here and get us around the limitation?

I am using Postgres 9.1.1 and its bundled pgAdmin III 1.14.0 on Windows 7 x64.

Aren
Вложения

В списке pgadmin-support по дате отправления:

Предыдущее
От: Brian Myers
Дата:
Сообщение: Upstart script for pgagent on Ubuntu...
Следующее
От: Dave Page
Дата:
Сообщение: Re: Problems changing a view