I tried : select count('x') from patients; And I get the same error. select count('x'); should return the same as select count(*); which returns 1. Previous Postgres versions returned 1. -ESR- Peter Eisentraut wrote: Tom Lane wrote:Bruce Momjian <[EMAIL PROTECTED]> writes:What is COUNT('x') supposed to return? 1? Is that legal SQL?Why not?Because there is nothing to count.In general, SELECT count(expr) FROM table1; counts the number of rows in table1 where expr evaluates to not null. If table1 is not specified, that rule no longer holds. At best you could assume that table1 is empty and return 0. But a result of 1 I cannot see justified. |
- [HACKERS] Postgres 7.3.5 and count('x') Edwin S. Ramirez
- Re: [HACKERS] Postgres 7.3.5 and count('x') Tom Lane
- Re: [HACKERS] Postgres 7.3.5 and count('x') Bruce Momjian
- Re: [HACKERS] Postgres 7.3.5 and count('x') Tom Lane
- Re: [HACKERS] Postgres 7.3.5 and count('... Peter Eisentraut
- Re: [HACKERS] Postgres 7.3.5 and co... Tom Lane
- Re: [HACKERS] Postgres 7.3.5 and co... Edwin S. Ramirez
- Re: [HACKERS] Postgres 7.3.5 and count('x') Tom Lane