Search Postgresql Archives

COPY for .CSV files problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Hi everybody,
  I want to enter a .CSV file using COPY comand and plpgsql. It enters
lat,lon 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 can I
use catalog?

  Thanks in advance,
   Pere
-- 
View this message in context: http://www.nabble.com/COPY-for-.CSV-files-problem-tf4546778.html#a12974836
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux