On Thu, Jun 29, 2006 at 03:10:03PM +0200, Mehdi Aboulkassim wrote: > I have to write a function that takes a flat file name in parameter > and load a table with the file information.
Does it matter if this function runs on the server side or in the client? > I think that it has to read the file line per line and parse each > one to retreive each column data. > > There is NO DELIMITERS between fields. How are field boundaries recognized? By column position? By patterns in the content? This might be easiest with a language like Perl, Python, Tcl, etc., whether on the client side or in a server-side function written in one of those languages (PL/Perl, PL/Python, PL/Tcl, etc.). You could do it with SQL but other languages are more suitable for text parsing. -- Michael Fuhr ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match