| От | Michael Fuhr |
|---|---|
| Тема | Re: Script for reading flat file without delimiters |
| Дата | |
| Msg-id | 20060629133657.GA37181@winnie.fuhr.org обсуждение исходный текст |
| Ответ на | Script for reading flat file without delimiters (Mehdi Aboulkassim <mehdi10ab@yahoo.fr>) |
| Список | pgsql-general |
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
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера