From: | Andrei Ivanov <andrei(dot)ivanov(at)ines(dot)ro> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | problem with escaping " |
Date: | 2002-10-22 12:30:46 |
Message-ID: | Pine.LNX.4.33L2.0210221505550.15581-100000@webdev.ines.ro |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
I've created a new type in C, with the following structure:
typedef struct movie_property {
int4 length;
int4 id;
char name[31];
char value[256];
} movie_property;
I did the functions for the input, parsing and output, but one problem
apears.
If I try to insert some text with " inside, I try to escape it with a \
(in fact, I'm doing this from php, with its function "addslashes")
INSERT INTO pp VALUES ('(1, "aa \" bb", "fghij")')
But I get an error:
Bad movie_property external representation '(1, "aa " bb", "fghij")'
which means that my movie_property_in function receives the string
'(1, "aa " bb", "fghij")', without the \ in it.
The same exact thing works for varchar or text fields.
What can I do ?
From | Date | Subject | |
---|---|---|---|
Next Message | Murali Mohan Kasetty | 2002-10-22 12:40:31 | IpcMemoryCreate: shmget(key=5432001, size=1441792, 03600) failed: Not enough memory |
Previous Message | pilsl | 2002-10-22 12:11:03 | 7.1.3 : pg_dumpall does not work for me |