Re: Feature request

Поиск
Список
Период
Сортировка
От Scott Miller
Тема Re: Feature request
Дата
Msg-id 76bb504a0805040557q4f70d320ye81d9854fbf8a98d@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Feature request  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список pgsql-general


On Sun, May 4, 2008 at 12:31 AM, Scott Marlowe <scott.marlowe@gmail.com> wrote:

You have the same type of problem if you have this query:

select count(id), count(int2) from table.

They both are named count.  The simple answer is to always alias your
select fields.

select count(id) as idcount, count(int2) as intcount from table.

Of course.  This is the a limitation stemming from the CakePHP web development framework.  In this case, it would assign those two fields to an unnamed table/bucket, but for columns stemming from the from clause, it splits them into buckets based on the table alias name.  I can alias the table names, but it means rewriting all the custom queries in the app, or the resulting processing code which has been relying on the bucketizing.  Which is what I will do.  Just another small speedbump moving my app away from MySQL.

Scott

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Autocast script of peter e in PostgreSQL 8.3
Следующее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: storing long live parameters