FAQ

Hi,
unfortunately I did not receive any response from questions@ so maybe you could
answer this question directly.
I'm not shure if I made a mistake or stumbled over a bug...
I think it's a bug. There has to be a better way to count(*).
Ok, here it is:

I'm using pgsql 6.1 as of mai 15'th on FreeBSD 3.0-current.

------------------------------------
-- Select all values which are in foo but not in bar
select count(*) from foo a1, baz a2
where a1.nr <> a2.nr;
------------------------------


Then I get:
WARN:Column oid is ambiguous


What does this mean?
When a count(*) is parsed, the * is changed to oid. In this case,
I believe you are getting the warning since the count(*) is being
transformed to count(oid) and there is an oid column in both a1 and
a2.

This works for one table, but is obviously ambiguous with more than
one table...

Workaround...try...

select count(a1.nr) from foo a1, baz a2
where a1.nr <> a2.nr;


Darren darrenk@insightdist.com

------------------------------

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedMay 19, '97 at 12:26p
activeMay 31, '97 at 3:26a
posts3
users3
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase