using COPY, .CSV and ¿catalog?

From: "pere roca ristol" <peroc79(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org(dot)
Subject: using COPY, .CSV and ¿catalog?
Date: 2007-10-01 07:53:56
Message-ID: ffb5ec840710010053p5976419bs449ed9687e23ea26@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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).
So, I have a problem. I thought that may be I can reference/select data of
a SINGLE USER using parameters like default_time without need to insert this
data as a field in the table (otherwise, problems with COPY). Maybe asking
in catalog?

Thanks,
Pere

Responses

Browse pgsql-general by date

  From Date Subject
Next Message pere roca 2007-10-01 08:20:52 COPY for .CSV files problem
Previous Message Webb Sprague 2007-09-30 23:28:43 Inheritance fixing timeline? (Was "Inherited FK Indexing")