| От | Noel Faux |
|---|---|
| Тема | Re: Inserting file content into column |
| Дата | |
| Msg-id | 4484CFB1.8070200@med.monash.edu.au обсуждение исходный текст |
| Ответ на | Inserting file content into column ("Moravec Jan" <Jan.Moravec@ips-ag.cz>) |
| Список | pgsql-novice |
Hi Moravec,
Look at the COPY command.
Cheers
Noel
Moravec Jan wrote:
> Hello,
>
> Is there a built-in function that reads the contents of a (textual) file which could then be inserted into a given
(varchar)column. What I am after is something like:
>
> insert into cert ( cert_id,...., x509_data ) values ( nextval('seq_cert'), ...., load_file('./ca/mycert.pem') );
>
> I need to do that from a DB init SQL script rather then from an application.
>
> Thanks you,
> Jan Moravec
>
>
>
> ---------------------------(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
>
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера