Unix Technical Forum

PostgreSQL 8.2beta1 w/ VALUES

This is a discussion on PostgreSQL 8.2beta1 w/ VALUES within the pgsql Hackers forums, part of the PostgreSQL category; --> Greetings, Was just playing with 8.2beta1 and importing some data from MySQL and found something rather annoying. Not *100%* ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 04:55 AM
Stephen Frost
 
Posts: n/a
Default PostgreSQL 8.2beta1 w/ VALUES

Greetings,

Was just playing with 8.2beta1 and importing some data from MySQL and
found something rather annoying. Not *100%* sure the best way to deal
with this, if there even is a way, but...

When loading a rather large data set I started getting errors along
these lines:

psql:/home/sfrost/school/cs750/reality/dump-anonymized.postgres.sql:262:
WARNING: nonstandard use of escape in a string literal
LINE 1: ...XXXXXXXXXX 9999,9:9:999'),(99999,'000000000000',0,'XXXXX XXX...
^
HINT: Use the escape string syntax for escapes, e.g., E'\r\n'.
psql:/home/sfrost/school/cs750/reality/dump-anonymized.postgres.sql:262:
WARNING: nonstandard use of escape in a string literal
LINE 1: ...9999999999',0,',9:9:999'),(99999,'000000000000' ,0,'XXXX XXXX...
^
HINT: Use the escape string syntax for escapes, e.g., E'\r\n'.
INSERT 0 20795
cs750=#

Which, by themselves, aren't really an issue *except* for the fact
that I got an *insane* number of them. I don't think it was quite one
for every row (of which there were 20,795, you'll note) but it was
more than enough to drive me insane. Additionally, cancel requests
were ignored. It's possible this was because of network lag and the
server had already processed the request but I'm not sure that was the
only reason. I know I held down ctrl-c for quite a while during the
spew of messages...

Anyhow, don't know if there's really a good solution but it'd be nice
to only get one warning, or one of a given type, or something, and to
respond to cancel requests (if there was an issue there). Sorry this
is more from a user's perspective, I havn't got time atm to go digging
through the code. I'd be curious about implementing a possible
error-aggregation system for reporting on large sets like this but
that might be overkill anyway.

Thanks,

Stephen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFFeLprzgMPqB3kigRAkZ+AKCUnWtPxDUWdTomLlZiiK VR4Qbn3wCfUggM
zWgr1dIQzq054RL64bBAKmk=
=y3rL
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 04:55 AM
Joshua D. Drake
 
Posts: n/a
Default Re: PostgreSQL 8.2beta1 w/ VALUES


> Anyhow, don't know if there's really a good solution but it'd be nice
> to only get one warning, or one of a given type, or something, and to


Except that one warning would not be accurate, because the warning is
per tuple. How is postgresql going to know that the warning applies to
the same set of data but just a different tuple?


> respond to cancel requests (if there was an issue there). Sorry this
> is more from a user's perspective, I havn't got time atm to go digging
> through the code. I'd be curious about implementing a possible
> error-aggregation system for reporting on large sets like this but
> that might be overkill anyway.


You could dial down client_min_messages, set it to ERROR, then you won't
see warnings

Sincerely,

Joshua D. Drake


>
> Thanks,
>
> Stephen



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-12-2008, 05:03 AM
Tom Lane
 
Posts: n/a
Default Re: PostgreSQL 8.2beta1 w/ VALUES

Stephen Frost <sfrost@snowman.net> writes:
> When loading a rather large data set I started getting errors along
> these lines:
> psql:/home/sfrost/school/cs750/reality/dump-anonymized.postgres.sql:262:
> WARNING: nonstandard use of escape in a string literal
> LINE 1: ...XXXXXXXXXX 9999,9:9:999'),(99999,'000000000000',0,'XXXXX XXX...
> ^
> HINT: Use the escape string syntax for escapes, e.g., E'\r\n'.


> Which, by themselves, aren't really an issue *except* for the fact
> that I got an *insane* number of them. I don't think it was quite one
> for every row (of which there were 20,795, you'll note) but it was
> more than enough to drive me insane. Additionally, cancel requests
> were ignored.


That's not too surprising because I don't believe there are any
CHECK_FOR_INTERRUPTS calls in the basic lex/parse loop. That wouldn't
normally be a problem because that phase is pretty quick, but it is a
problem if the system is spitting tons of messages at you.

It seems like a reasonable thing to do would be to add a
CHECK_FOR_INTERRUPTS in elog.c just after sending a notice/warning
message to the client.

Comments?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:11 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com