pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedSELECT COUNT(*)... returns 0 ROWS
4+ messages / 3 participants
[nested] [flat]
* SELECT COUNT(*)... returns 0 ROWS
@ 2003-10-31 19:33 PostgreSQL <postgres@coopelesca.co.cr>
0 siblings, 1 reply; 4+ messages in thread
From: PostgreSQL @ 2003-10-31 19:33 UTC (permalink / raw)
To: pgsql-admin
I have instaled Postgres 7.3.4 on RH 9,
if I excecute:
select count(*) from cj_tranh;
count
-------
0
(1 row)
Why the result us CERO? the table have 1.400.000 rows!
What is wrong? Anybody help please.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: SELECT COUNT(*)... returns 0 ROWS
@ 2003-10-31 19:47 Jeff <threshar@torgo.978.org>
parent: PostgreSQL <postgres@coopelesca.co.cr>
0 siblings, 1 reply; 4+ messages in thread
From: Jeff @ 2003-10-31 19:47 UTC (permalink / raw)
To: PostgreSQL <postgres@coopelesca.co.cr>; +Cc: pgsql-admin
On Fri, 31 Oct 2003 13:33:09 -0600
"PostgreSQL" <postgres@coopelesca.co.cr> wrote:
> I have instaled Postgres 7.3.4 on RH 9,
> if I excecute:
>
> select count(*) from cj_tranh;
> count
> -------
> 0
> (1 row)
>
> Why the result us CERO? the table have 1.400.000 rows!
> What is wrong? Anybody help please.
>
1. did you remember to load data?
2. did someone accidentally delete the data?
3. are you connected to the correct db (I've panic'd before but realized
I was on dev, not production!)?
4. sure that is the right table?
--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/
http://www.stuarthamm.net/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: SELECT COUNT(*)... returns 0 ROWS
@ 2003-10-31 21:27 Tom Lane <tgl@sss.pgh.pa.us>
parent: Jeff <threshar@torgo.978.org>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2003-10-31 21:27 UTC (permalink / raw)
To: Jeff <threshar@torgo.978.org>; +Cc: PostgreSQL <postgres@coopelesca.co.cr>; pgsql-admin
Jeff <threshar@torgo.978.org> writes:
> "PostgreSQL" <postgres@coopelesca.co.cr> wrote:
>> Why the result us CERO? the table have 1.400.000 rows!
> 1. did you remember to load data?
> 2. did someone accidentally delete the data?
> 3. are you connected to the correct db (I've panic'd before but realized
> I was on dev, not production!)?
> 4. sure that is the right table?
I'm wondering about MVCC-related conditions, which adds a couple
more questions:
5. Did you actually commit the transaction that loaded the rows?
6. Are you doing the SELECT COUNT(*) in a transaction that started
before the data-loading transaction committed?
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: SELECT COUNT(*)... returns 0 ROWS
@ 2003-10-31 21:59 PostgreSQL <postgres@coopelesca.co.cr>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 4+ messages in thread
From: PostgreSQL @ 2003-10-31 21:59 UTC (permalink / raw)
To: pgsql-admin
Thank to all
I was in the WRONG database. Sorry, and thanks!
-----Original Message-----
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff <threshar@torgo.978.org>
Cc: "PostgreSQL" <postgres@coopelesca.co.cr>, pgsql-admin@postgresql.org
Date: Fri, 31 Oct 2003 16:27:31 -0500
Subject: Re: [ADMIN] SELECT COUNT(*)... returns 0 ROWS
> Jeff <threshar@torgo.978.org> writes:
> > "PostgreSQL" <postgres@coopelesca.co.cr> wrote:
> >> Why the result us CERO? the table have 1.400.000 rows!
>
> > 1. did you remember to load data?
> > 2. did someone accidentally delete the data?
> > 3. are you connected to the correct db (I've panic'd before but
> realized
> > I was on dev, not production!)?
> > 4. sure that is the right table?
>
> I'm wondering about MVCC-related conditions, which adds a couple
> more questions:
>
> 5. Did you actually commit the transaction that loaded the rows?
> 6. Are you doing the SELECT COUNT(*) in a transaction that started
> before the data-loading transaction committed?
>
> regards, tom lane
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2003-10-31 21:59 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-31 19:33 SELECT COUNT(*)... returns 0 ROWS PostgreSQL <postgres@coopelesca.co.cr>
2003-10-31 19:47 ` Jeff <threshar@torgo.978.org>
2003-10-31 21:27 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-10-31 21:59 ` PostgreSQL <postgres@coopelesca.co.cr>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox