<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Messages posted by "tonton"]]></title>
		<link>http://forum.geonames.org/gforum/posts/listByUser/1335.page</link>
		<description><![CDATA[Messages posted by "tonton"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>import countyInfo.txt postgresql</title>
				<description><![CDATA[ OK it's made thanks 

i create a table in my database 
<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>
 CREATE TABLE "countryinfo" &#40;
      iso_alpha2 char&#40;2&#41;,
      iso_alpha3 char&#40;3&#41;,
      iso_numeric integer,
      fips_code character varying&#40;3&#41;,
      country character varying&#40;200&#41;,
      capital character varying&#40;200&#41;,
      areainsqkm double precision,
      population integer,
      continent char&#40;2&#41;,
      tld CHAR&#40;10&#41;,
      currency_code char&#40;3&#41;,
      currency_name CHAR&#40;15&#41;,
      phone character varying&#40;20&#41;,
      languages character varying&#40;200&#41;,
      geonameId int,
      neighbours character varying&#40;50&#41;,
      equivalent_fips_code character varying&#40;3&#41;
 &#41;;
</pre>
		</div>
I change file countryInfo.txt in the file join 1countryInfo.txt

and use <span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>

 copy countryInfo &#40;iso_alpha2,iso_alpha3,iso_numeric,fips_code,country,capital,areainsqkm,population,continent,tld,currency_code,currency_name,phone,languages,geonameid,neighbours,equivalent_fips_code&#41;from '1countryInfo.txt' null as '';
</pre>
		</div>
result : COPY 247  :roll: 

tonton]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/preList/1208/5158.page#5158</guid>
				<link>http://forum.geonames.org/gforum/posts/preList/1208/5158.page#5158</link>
				<pubDate><![CDATA[Sat, 10 Jan 2009 03:36:40]]> GMT</pubDate>
				<author><![CDATA[ tonton]]></author>
			</item>
			<item>
				<title>Re:import countyInfo.txt postgresql</title>
				<description><![CDATA[ high marc thanks for your answer 

i'am french and not sure my translate

i just search to understand how it is made and what it's mean !

it is something like having a fish and knowing phishing :roll: 

so how to import that data into countryinfo tables 

cause psql hanging with data starting with ## 

what i have to delete for correct import 
with table creat with the faq 

http://forum.geonames.org/gforum/posts/list/67.page

copy countryInfo  (iso_alpha2,iso_alpha3,iso_numeric,fips_code,name,capital,areaInSqKm,population,continent,languages,currency,geonameId) from 'countryInfo.txt' null as ''; not match cause 
##^(?:AD)*(\d{3})$

does i delete a column 
just ## and then ### #### so on 
all things between # and $
i right quote in file for beeing accept data 


 :?: ]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/preList/1208/5154.page#5154</guid>
				<link>http://forum.geonames.org/gforum/posts/preList/1208/5154.page#5154</link>
				<pubDate><![CDATA[Fri, 9 Jan 2009 18:21:08]]> GMT</pubDate>
				<author><![CDATA[ tonton]]></author>
			</item>
			<item>
				<title>import countyInfo.txt postgresql</title>
				<description><![CDATA[  :oops: newbee asking maybe

i use some post here and found i am not the only one in trouble to importe this file in the table 

some change the table 
some change the script or the file 

but into some line there something like that : 

##^(?:AD)*(\d{3})$ 

wich not like by psql 

i remove line starting with # for comments 

but what means this ##^(?:AD)*(\d{3})$  is it to be interpreted by some database functions ? 
did we need to replace by something before import to countryInfo table 

thanks for your works sure and you help ...:?:

tonton ]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/preList/1208/5151.page#5151</guid>
				<link>http://forum.geonames.org/gforum/posts/preList/1208/5151.page#5151</link>
				<pubDate><![CDATA[Fri, 9 Jan 2009 02:23:07]]> GMT</pubDate>
				<author><![CDATA[ tonton]]></author>
			</item>
	</channel>
</rss>