pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedSimple Query Doesn't Even with Data
3+ messages / 3 participants
[nested] [flat]
* Simple Query Doesn't Even with Data
@ 2022-03-10 01:40 Scott Macri <Scott@BITSnBYTES.io>
2022-03-10 08:20 ` Re: Simple Query Doesn't Even with Data Julien Rouhaud <rjuju123@gmail.com>
2022-03-10 08:30 ` Re: Simple Query Doesn't Even with Data Ken Tanzer <ken.tanzer@gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: Scott Macri @ 2022-03-10 01:40 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
I have a simple database with table, "map_table", and coulmn,
"company_letters". The database is populated and the first row
contains a value of 'abcdefg' in the company_letters column.
If I do a select * without a where clause I get the expected results.
However, when I execute the following select statement I was astonished
to see no results come back.
Any idea what could possibly be wrong here?
I've verified the data a 100 times and am totally perplexed. Thanks.
SELECT *
FROM public.map_table
WHERE company_letters = 'abcdefg';
--
Hacktorious
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Simple Query Doesn't Even with Data
2022-03-10 01:40 Simple Query Doesn't Even with Data Scott Macri <Scott@BITSnBYTES.io>
@ 2022-03-10 08:20 ` Julien Rouhaud <rjuju123@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Julien Rouhaud @ 2022-03-10 08:20 UTC (permalink / raw)
To: Scott Macri <Scott@bitsnbytes.io>; +Cc: pgsql-general@lists.postgresql.org
Hi,
On Wed, Mar 09, 2022 at 08:40:45PM -0500, Scott Macri wrote:
>
> If I do a select * without a where clause I get the expected results.
> However, when I execute the following select statement I was astonished
> to see no results come back.
>
> SELECT *
> FROM public.map_table
> WHERE company_letters = 'abcdefg';
It looks like an index corruption, a REINDEX of that table should fix the
problem.
Did you update your system recently, which
may have updated your libc/libicu version, or replicated data over different OS
version (which could lead to the same problem)? If yes, it's a known problem
and you have to reindex all indexes that uses collatable datatypes afterwards.
You can look at https://wiki.postgresql.org/wiki/Locale_data_changes for more
details about that problem.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Simple Query Doesn't Even with Data
2022-03-10 01:40 Simple Query Doesn't Even with Data Scott Macri <Scott@BITSnBYTES.io>
@ 2022-03-10 08:30 ` Ken Tanzer <ken.tanzer@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Ken Tanzer @ 2022-03-10 08:30 UTC (permalink / raw)
To: Scott@bitsnbytes.io; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Thu, Mar 10, 2022 at 12:12 AM Scott Macri <Scott@bitsnbytes.io> wrote:
I've verified the data a 100 times and am totally perplexed. Thanks.
>
> SELECT *
> FROM public.map_table
> WHERE company_letters = 'abcdefg';
>
>
Not sure what kinds of verification you did, but did you check to make sure
that there's no trailing whitespace?
What do you see for that row if you run this query?
SELECT
company_letters,length(company_letters),company_letters='abcdefg',trim(company_letters)='abcdefg'
FROM public.map_table;
--
AGENCY Software
A Free Software data system
By and for non-profits
*http://agency-software.org/ <http://agency-software.org/>*
*https://demo.agency-software.org/client
<https://demo.agency-software.org/client>*
ken.tanzer@agency-software.org
(253) 245-3801
Subscribe to the mailing list
<agency-general-request@lists.sourceforge.net?body=subscribe> to
learn more about AGENCY or
follow the discussion.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-03-10 08:30 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10 01:40 Simple Query Doesn't Even with Data Scott Macri <Scott@BITSnBYTES.io>
2022-03-10 08:20 ` Julien Rouhaud <rjuju123@gmail.com>
2022-03-10 08:30 ` Ken Tanzer <ken.tanzer@gmail.com>
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