pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: BORGULYA Gergely <bg057@hszk.bme.hu>
To: pgsql-sql@postgresql.org
Subject: storing special characters
Date: Sun, 17 Jun 2001 15:24:06 +0200
Message-ID: <01061715240605.00537@pc2151> (raw)

Helo,

I'm using postgresql 7.1, with suse linux 7.1 on i386.
I'm programming in python and I'm going to store many, long (approx. 600 
bytes) python-variables in a postgres database. There is a way to convert 
python-variables into string (either binary or text) format to make them 
possible to be stored in files or databases. The string converted from the 
variable is full of characters that are treated specially by the 
query-language, so I always get error messages if I try them to store with 
the INSERT INTO command.
To save them to files, COPY them one-by-one to a temporary table then move 
them to the appropriate table and row, delete the file, drop the table seems 
to be a very long procedure.
Is there a simple and smart way to store such strings in databases? I could 
not find solution for such a problem in the documentation.

Gergely BORGULYA

 



view thread (2+ messages)  latest in thread

Message-ID: <01061715240605.00537@pc2151>
Permalink:  ../01061715240605.00537@pc2151/
Also on:    postgresql.org/message-id/01061715240605.00537@pc2151

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bg057@hszk.bme.hu
  Subject: Re: storing special characters
  In-Reply-To: <01061715240605.00537@pc2151>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox