Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Bug reports and fixes
.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Database
»
Error with 2009.2 and PostgreSQL
« previous
next »
Print
Pages: [
1
]
Author
Topic: Error with 2009.2 and PostgreSQL (Read 11403 times)
forgetms
Newbie
Posts: 42
Error with 2009.2 and PostgreSQL
«
on:
November 10, 2010, 04:17:49 »
URI: index2.php
Message: ERROR: column "session.username" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: SELECT username, time, userid, usertype, gid, ip FROM sessio... ^
SELECT username, time, userid, usertype, gid, ip FROM session GROUP BY ip ORDER BY time DESC LIMIT 10 OFFSET 0
Regards,
CN
Logged
CREATIVE Options
Authorized Elxis Professional
Elxis Community
Hero Member
Posts: 2334
Professional services for Elxis CMS
Re: Error with 2009.2 and PostgreSQL
«
Reply #1 on:
November 10, 2010, 08:59:40 »
Hello, this is not an Elxis problem but from ADODB.
for how to solve this, first seach the forum for the solution, we have already answer it.
And then if you dont find it, post back please.
Logged
forgetms
Newbie
Posts: 42
Re: Error with 2009.2 and PostgreSQL
«
Reply #2 on:
November 10, 2010, 11:15:25 »
Thank you for the reply!
I have not successfully found the post you mentioned.
I have few knowledge about Elxis/ADODB/SQL standards. However, I am still attaching the following excerpt from PostgreSQL discussion archive as follows if you are interested in the so called "SQL standards":
"The simple fact is that it is only in the 1992 standard that it states that
ALL columns in the SELECT clause must be identified in the GROUP BY clause.
In all subsequent standards it has been permissible to omit any column from
the GROUP BY clause if it is functionally dependent on any other column in
the GROUP BY clause."
http://archives.postgresql.org/pgsql-bugs/2008-10/msg00061.php
Best Regards,
CN
[begin add]
http://www.ianywhere.com/developer/product_manuals/sqlanywhere/0902/en/html/dbugen9/00000284.htm
"The SQL/92 standard for GROUP BY requires the following:
A column used in an expression of the SELECT clause must be in the GROUP BY clause. Otherwise, the expression using that column is an aggregate function.
A GROUP BY expression can only contain column names from the select list, but not those used only as arguments for vector aggregates.
The results of a standard GROUP BY with vector aggregate functions produce one row with one value per group."
«
Last Edit: November 10, 2010, 11:19:07 by forgetms
»
Logged
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Database
»
Error with 2009.2 and PostgreSQL