Search Postgresql Archives

Re: Import SVG file

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

 



Miguel Angel Tribaldos Hervas wrote:
I want to do the import from the psql client. I try to find something like that:


INSERT INTO "controller" (notes, enabled, diagram, ...) VALUES ('Example controller', TRUE, load_svg('controller.svg'), ...)


with diagram of type TEXT, and diagram field correctly escaped.

Hmm - I don't know of anything which can do this for you. It'd be difficult since by the time load_svg() is parsed and executed the statement is server-side not client-side.


Ten lines of Perl/Python should do it just fine though. IIRC svg is just xml, so the only thing you should need to escape is the single-quote

--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
     subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
     message can get through to the mailing list cleanly

[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