pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Double quotes?
4+ messages / 4 participants
[nested] [flat]

* Re: Double quotes?
@ 1970-01-01 00:00  Christoph Haller <ch@rodos.fzk.de>
  parent: Archibald Zimonyi <archie@netg.se>
  0 siblings, 0 replies; 4+ messages in thread

From: Christoph Haller @ 1970-01-01 00:00 UTC (permalink / raw)
  To: archie@netg.se; +Cc: pgsql-sql

The information you gave is not very helpful. 
An INSERT command, which caused the error, would help. 
Anyway, did you enclose the text by single quotes? 
AFAIK, you do not have to escape double quotes. 

Regards, Christoph 
> 
> Hi everyone,
> 
> I have a column with type text and am trying to pump in a larger amount of
> text that has double quotes and also commas in between. I got an error
> when I tried to do a simple INSERT. I then tried to escape the double
> quote with a backslash but that didn't work. The manual for the 7.1
> database says that I can escape charactes by using the \xxx where xxx is
> the octal value of the character. Is this the only way or have I missed
> out on something simple and just keep making a small mistake?
> 
> Thanks in advance,
> 
> Archie
> 





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* (no subject)
@ 2002-07-08 08:11  jack <datactrl@tpg.com.au>
  0 siblings, 2 replies; 4+ messages in thread

From: jack @ 2002-07-08 08:11 UTC (permalink / raw)
  To: pgsql-sql

Hi,
Regarding temp tables in the same connection session. If there is SQL
procedure creating temp tables, process temp tables and drop all the temp
tables finally. This SQL procedure can't run twice in the same session.
Because all the temp tables are referred to the first physical temp tables.
I posted this question couple months ago and the final reply is that in the
future version, all the sql procedures, which use temp tables, will be
forced to re-compile though it's been used in the session.

Now, my question is, if it has been done, do I still need to drop all the
temp tables before I re-run the same SQL procedure in the same session?

Jack






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Double quotes?
@ 2002-07-08 10:35  Archibald Zimonyi <archie@netg.se>
  parent: jack <datactrl@tpg.com.au>
  1 sibling, 1 reply; 4+ messages in thread

From: Archibald Zimonyi @ 2002-07-08 10:35 UTC (permalink / raw)
  To: pgsql-sql


Hi everyone,

I have a column with type text and am trying to pump in a larger amount of
text that has double quotes and also commas in between. I got an error
when I tried to do a simple INSERT. I then tried to escape the double
quote with a backslash but that didn't work. The manual for the 7.1
database says that I can escape charactes by using the \xxx where xxx is
the octal value of the character. Is this the only way or have I missed
out on something simple and just keep making a small mistake?

Thanks in advance,

Archie







^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re:
@ 2002-07-08 18:40  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: jack <datactrl@tpg.com.au>
  1 sibling, 0 replies; 4+ messages in thread

From: Bruce Momjian @ 2002-07-08 18:40 UTC (permalink / raw)
  To: jack <datactrl@tpg.com.au>; +Cc: pgsql-sql

jack wrote:
> Hi,
> Regarding temp tables in the same connection session. If there is SQL
> procedure creating temp tables, process temp tables and drop all the temp
> tables finally. This SQL procedure can't run twice in the same session.
> Because all the temp tables are referred to the first physical temp tables.
> I posted this question couple months ago and the final reply is that in the
> future version, all the sql procedures, which use temp tables, will be
> forced to re-compile though it's been used in the session.
> 
> Now, my question is, if it has been done, do I still need to drop all the
> temp tables before I re-run the same SQL procedure in the same session?

Actually, we recomment using EXECUTE for any temp table access from
pl/pgsql stored procedures.  We even have an FAQ item now:

    <H4><A name="4.26">4.26</A>) Why can't I reliably create/drop
    temporary tables in PL/PgSQL functions?</H4>
    PL/PgSQL caches function contents, and an unfortunate side effect
    is that if a PL/PgSQL function accesses a temporary table, and that
    table is later dropped and recreated, and the function called
    again, the function will fail because the cached function contents
    still point to the old temporary table. The solution is to use
    <SMALL>EXECUTE</SMALL> for temporary table access in PL/PgSQL. This
    will cause the query to be reparsed every time. 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2002-07-08 18:40 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-07-08 08:11  jack <datactrl@tpg.com.au>
2002-07-08 10:35 ` Archibald Zimonyi <archie@netg.se>
1970-01-01 00:00   ` Christoph Haller <ch@rodos.fzk.de>
2002-07-08 18:40 ` Re: Bruce Momjian <pgman@candle.pha.pa.us>

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