On 03/07/2017 01:22 AM, Johann Spies wrote:
Thanks (again Adrian) and Tom.
The situation was that I had a table with 731million records which I
wanted to copy into a partitioned one where there was a unique
constraint on the fields used in my query.
The "backup" table was the single one.
While
Thanks (again Adrian) and Tom.
The situation was that I had a table with 731million records which I wanted
to copy into a partitioned one where there was a unique constraint on the
fields used in my query.
The "backup" table was the single one.
While inserting into the partitioned table from the
Adrian Klaver writes:
> Where I am going with this, is that it is not clear to me how you are
> matching the two sets of records to determine whether they are different
> or not.
He's not. The query is forming the cartesian product of the two tables
and then dropping join rows where the tables
On 03/01/2017 12:15 AM, Johann Spies wrote:
On 28 February 2017 at 17:06, Adrian Klaver mailto:adrian.kla...@aklaver.com>> wrote:
I have not worked through all this but at first glance I suspect:
select distinct b.* from b ...
is distinct from ...
constitutes a double negativ
On 28 February 2017 at 17:06, Adrian Klaver
wrote:
>
> I have not worked through all this but at first glance I suspect:
>
> select distinct b.* from b ...
>
> is distinct from ...
>
> constitutes a double negative.
>
> What happens if you eliminate the first distinct?
>
>
>
> Thanks Adrian,
The
On 02/28/2017 12:08 AM, Johann Spies wrote:
When I query table a I get 18 rows.
The same query on table b results in 28 rows.
Both tables have the same structure.
When I export the results to csv-files and do a diff it confirms that
all 18 rows from a are also in b. Table b has 10 new rows.
Wh
When I query table a I get 18 rows.
The same query on table b results in 28 rows.
Both tables have the same structure.
When I export the results to csv-files and do a diff it confirms that all
18 rows from a are also in b. Table b has 10 new rows.
When I combine these queries and use "is (not) d
"Robert Haas" <[EMAIL PROTECTED]> writes:
> That doesn't seem to work, because IS NOT DISTINCT FROM is not an
> operator.
Yah :-(
> So then I tried creating an operator === (anyelement,
> anyelement) that just does IS NOT DISTINCT FROM and writing:
> select 1 === any(array[1]);
> which got me:
>
I'm trying to write a SQL statement to determine whether a value is an
an array, but I want the comparison to be done using IS NOT DISTINCT
FROM rather than =.
My first thought was that instead of writing:
SELECT value = ANY(array)
...I could simply write:
SELECT value IS NOT DISTINCT FROM ANY(