Re: Import SVG file

From: Richard Huxton <dev(at)archonet(dot)com>
To: Miguel Angel Tribaldos Hervas <mitriher(at)teleco(dot)upv(dot)es>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Import SVG file
Date: 2005-01-28 14:03:01
Message-ID: 41FA4615.1080709@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alex Turner 2005-01-28 15:23:59 Shared Memory/Shared Buffers
Previous Message Christopher Kings-Lynne 2005-01-28 13:46:00 MySQL worm attacks Windows servers