Re: using COPY, .CSV and ¿catalog?

From: "Andrej Ricnik-Bay" <andrej(dot)groups(at)gmail(dot)com>
To: "pere roca ristol" <peroc79(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: using COPY, .CSV and ¿catalog?
Date: 2007-10-01 17:27:33
Message-ID: b35603930710011027k3dd95d0awf14dc8203c5d2896@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/1/07, pere roca ristol <peroc79(at)gmail(dot)com> wrote:
> Hi everybody,

> I want to enter a .CSV file using COPY comand and plpgsql.
> It enters latitude,longitude and some data. In the CSV data there is no
> field (such as "user_name" or current_time) that allow distinguish future
> queries for different users (ex: select x,y from table where user_name=z;
> after entering lat,lon I would like to update the_geom in another table
> using the lat,lon of ONLY this user).

> I could update this kind of data ("user_name") using php but next user
> could not enter his data by COPY (it only lets fill the destination table if
> ALL the fields are the same as the CSV or text file).
I'm not a 100% certain I understand what you're trying
to achieve, but to me this looks like a mis-use? Why
not use the relational features of your RDBMS and just
pick a location from a table created once via a unique
value you assign during (or after) the COPY?

> Thanks,
> Pere
Cheers,
Andrej

--
Please don't top post, and don't use HTML e-Mail :} Make your quotes concise.

http://www.american.edu/econ/notes/htmlmail.htm

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2007-10-01 17:33:53 Re: more problems with count(*) on large table
Previous Message Gauthier, Dave 2007-10-01 17:26:45 Upgrading PG