Re: md5 of table

From: Sim Zacks <sim(at)compulab(dot)co(dot)il>
To: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: md5 of table
Date: 2011-09-01 14:26:44
Message-ID: 4E5F9624.3050909@compulab.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> OP:
>> I thought about using dblink and the EXCEPT query, but then I need to know the field list of each query result, which is a pain in the butt.
> That is not correct. As long as the table definitions are precisely
> the same, you can move records across dblink without specifying
> fields. You do this by using record type for the composite which
> dblink sends across as text.
>
> merlin

Do you have a quick example? This is what I have tried:

select * from tbla
except
select * from dblink('host=dbhost dbname=otherdb user=myuser
password=mypwd'::text, 'select * from tbla')

The error I get back is:
ERROR: a column definition list is required for functions returning
"record"

Sim

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2011-09-01 14:32:23 Re: strange table disk sizes
Previous Message Merlin Moncure 2011-09-01 14:13:33 Re: md5 of table