Re: TABLESAMPLE patch - Mailing list pgsql-hackers

From Jaime Casanova
Subject Re: TABLESAMPLE patch
Date
Msg-id CAJKUy5jmQb01bKT=NWRkMhwRz0as5R=dDh5cphHLsCjt9+DD2w@mail.gmail.com
Whole thread Raw
In response to Re: TABLESAMPLE patch  (Petr Jelinek <petr@2ndquadrant.com>)
Responses Re: TABLESAMPLE patch  (Petr Jelinek <petr@2ndquadrant.com>)
List pgsql-hackers
On Thu, Dec 18, 2014 at 7:14 AM, Petr Jelinek <petr@2ndquadrant.com> wrote:
> Hi,
>
> v2 version of this patch is attached.
>

a few more tests revealed that passing null as the sample size
argument works, and it shouldn't.
in repeatable it gives an error if i use null as argument but it gives
a syntax error, and it should be a data exception (data exception --
invalid repeat argument in a sample clause) according to the standard

also you need to add CHECK_FOR_INTERRUPTS somewhere, i tried with a
big table and had to wait a long time for it to finish

"""
regression=# select count(1) from tenk1 tablesample system (null);count
-------   28
(1 row)

regression=# select count(1) from tenk1 tablesample bernoulli (null);count
-------    0
(1 row)
"""

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación
Phone: +593 4 5107566         Cell: +593 987171157



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: pgbench -f and vacuum
Next
From: Robert Haas
Date:
Subject: Re: parallel mode and parallel contexts