From: | Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com> |
---|---|
To: | Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> |
Cc: | Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: COPY is not working |
Date: | 2010-04-30 11:31:35 |
Message-ID: | u2qe94e14cd1004300431i7fed61eao7fc47b4ad45328de@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2010/4/30 Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>:
> On Fri, Apr 30, 2010 at 1:13 AM, Takahiro Itagaki
> <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:
>>
>> Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> wrote:
>>
>>> ah! this is because COPY doesn't follow inherited tables... should it?
>>
>> Yes. You can use "COPY (SELECT * FROM a) TO " instead to copy all tuples.
>>
>> http://developer.postgresql.org/pgdocs/postgres/sql-copy.html
>> | COPY can only be used with plain tables, not with views.
>> | However, you can write COPY (SELECT * FROM viewname) TO ....
>>
>> Should we add "or parent tables" after "not with views"?
>> To be exact, it would be "'COPY a parent table TO' only copies
>> tuples in the parent table and does not copy inherited child tables".
>>
>
> +1 on make this clear on the docs
It works with parent table. Depends if the parent table have data or not.
COPY is more like SELECT FROM ONLY table, isn't it ?
>
> --
> Atentamente,
> Jaime Casanova
> Soporte y capacitación de PostgreSQL
> Asesoría y desarrollo de sistemas
> Guayaquil - Ecuador
> Cel. +59387171157
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
--
Cédric Villemain
From | Date | Subject | |
---|---|---|---|
Next Message | Cédric Villemain | 2010-04-30 11:35:27 | Re: missing file in git repo |
Previous Message | Stefan Kaltenbrunner | 2010-04-30 11:18:11 | Re: missing file in git repo |