From: | Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | James Finnerty <jfinnert(at)amazon(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: postgres_fdw: using TABLESAMPLE to collect remote sample |
Date: | 2023-01-01 22:36:49 |
Message-ID: | d13d28b9-30d0-27e8-d58e-d3e0c76b3bda@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12/31/22 18:23, Tom Lane wrote:
> Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> writes:
>> On 12/31/22 05:42, Tom Lane wrote:
>>> ERROR: TABLESAMPLE clause can only be applied to tables and materialized views
>>> I think the patch avoids that, but only accidentally, because
>>> reltuples will be 0 or -1 for a view. Maybe it'd be a good
>>> idea to pull back relkind along with reltuples, and check
>>> that too?
>
>> Not sure. I guess we can rely on reltuples being 0 or -1 in such cases,
>> but maybe it'd be good to at least mention that in a comment? We're not
>> going to use other reltuples values for views etc.
>
> Would anyone ever point a foreign table at a sequence? I guess it
> would be a weird use-case, but it's possible, or was till now.
>
Yeah, it's a weird use case. I can't quite imagine why would anyone do
that, but I guess the mere possibility is sufficient reason to add the
relkind check ...
regards
--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2023-01-01 23:31:50 | Re: Add a test to ldapbindpasswd |
Previous Message | Andrew Dunstan | 2023-01-01 19:58:10 | Re: Add a test to ldapbindpasswd |