Search Postgresql Archives

Re: fulltext search udf

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

 



Tom Lane wrote:
Andreas Wenk <a.wenk@xxxxxxxxxxxxxxxxxxxxxxx> writes:
EXECUTE 'INSERT INTO produkte (art_nr,bezeichnung,beschreibung,preis,steuersatz,aktionspreis,stichworte,vector) VALUES ('''||art_nr||''','''||bezeichnung||''','''||beschreibung||''','||preis||',
                    '||steuersatz||','||aktionspreis||','''||stichworte||''','||vect||')';

This is not going to work with such a half-baked approach to quoting the
data values --- any value with ' or \ in it will break it.  You could
use quote_literal(), but I wonder why you are bothering with EXECUTE at
all.  If you just did the INSERT directly it would run faster and be a
lot less ugly.

			regards, tom lane
Tom, thanks for the hint! I was really doing the wrong thing. There have been even more errors what made me confused. Now I got it ...

Cheers

Andy

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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