This is a discussion on Re: tsearch refactorings within the Pgsql Patches forums, part of the PostgreSQL category; --> > I am getting confused with the patches and version I have lying around > here... I think I'll ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| > I am getting confused with the patches and version I have lying around > here... I think I'll have to wait for review of the patches I've posted > this far before I continue hacking. Sorry for delay - I was busy by another. All your patches are committed with very small changes. -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/ ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| |||
| Teodor Sigaev wrote: >> I am getting confused with the patches and version I have lying around >> here... I think I'll have to wait for review of the patches I've posted >> this far before I continue hacking. > Sorry for delay - I was busy by another. All your patches are committed > with very small changes. Thanks! Can you please apply this fix for the bug Pavel found as well: http://archives.postgresql.org/pgsql...9/msg00127.php -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate |
| |||
| Heikki Linnakangas wrote: > Heikki Linnakangas wrote: >> BTW, the encoding of the XML datatype looks pretty funky. xml_recv first >> reads the xml string with pq_getmsgtext, which applies a client->server >> conversion. Then the xml declaration is parsed, extracting the encoding >> attribute. Then the string is converted again from that encoding (or >> UTF-8 if none was specified) to server encoding. I don't understand how >> it's supposed to work, but ISTM there's one conversion too much, > > And it's got an unfortunate typo in it as well: it calls "free(result)" > instead of pfree. I think we need regression tests for the more complex > send/recv functions... According to the docs, xml_send is supposed to output the XML document in client encoding, with that encoding specified in the xml declaration, eg. ?<xml encoding="LATIN1"?>. xml_recv is supposed to ignore client encoding, and parse the document according to the encoding specified in the declaration. Here's a patch that fixes the send/recv functions to work like the manual says. It fixes the free/pfree typo as well. Included is a new regression test for the send/recv functions as well (unpatched CVS HEAD fails it BTW). It can be merged with the existing xml test, but I didn't want to do it in the patch because it would've involved moving the current xml test from sql/ to input/, and made the patch longer to review. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| |||
| Heikki Linnakangas wrote: > + -- Basic test > + COPY xmltest TO '/home/hlinnaka/pg_sandbox/pgsql.cvshead/src/test/regress/results/xmltest.data' WITH BINARY; > + TRUNCATE xmltest; > + COPY xmltest FROM '/home/hlinnaka/pg_sandbox/pgsql.cvshead/src/test/regress/results/xmltest.data' WITH BINARY; > + SELECT * FROM xmltest; > + id | data > + ----+-------------------- > + 1 | <value>one</value> > + 2 | <value>two</value> > + (2 rows) This isn't going to work ... -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |
| |||
| Alvaro Herrera wrote: > Heikki Linnakangas wrote: > >> + -- Basic test >> + COPY xmltest TO '/home/hlinnaka/pg_sandbox/pgsql.cvshead/src/test/regress/results/xmltest.data' WITH BINARY; >> + TRUNCATE xmltest; >> + COPY xmltest FROM '/home/hlinnaka/pg_sandbox/pgsql.cvshead/src/test/regress/results/xmltest.data' WITH BINARY; >> + SELECT * FROM xmltest; >> + id | data >> + ----+-------------------- >> + 1 | <value>one</value> >> + 2 | <value>two</value> >> + (2 rows) > > This isn't going to work ... Care to elaborate? We could test a lot more, but that at least calls the send/recv functions. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match |
| |||
| Heikki Linnakangas wrote: > Alvaro Herrera wrote: >> Heikki Linnakangas wrote: >> >>> + -- Basic test >>> + COPY xmltest TO '/home/hlinnaka/pg_sandbox/pgsql.cvshead/src/test/regress/results/xmltest.data' WITH BINARY; >>> + TRUNCATE xmltest; >>> + COPY xmltest FROM '/home/hlinnaka/pg_sandbox/pgsql.cvshead/src/test/regress/results/xmltest.data' WITH BINARY; >>> + SELECT * FROM xmltest; >>> + id | data >>> + ----+-------------------- >>> + 1 | <value>one</value> >>> + 2 | <value>two</value> >>> + (2 rows) >> This isn't going to work ... > > Care to elaborate? > > We could test a lot more, but that at least calls the send/recv functions. Oh, I see what you mean. Yeah, the absolute paths need to be fixed -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| |||
| Done by Teodor. --------------------------------------------------------------------------- Heikki Linnakangas wrote: > Teodor Sigaev wrote: > >> I am getting confused with the patches and version I have lying around > >> here... I think I'll have to wait for review of the patches I've posted > >> this far before I continue hacking. > > Sorry for delay - I was busy by another. All your patches are committed > > with very small changes. > > Thanks! > > Can you please apply this fix for the bug Pavel found as well: > > http://archives.postgresql.org/pgsql...9/msg00127.php > > -- > Heikki Linnakangas > EnterpriseDB http://www.enterprisedb.com > > ---------------------------(end of broadcast)--------------------------- > TIP 7: You can help support the PostgreSQL project by donating at > > http://www.postgresql.org/about/donate -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
| |||
| "Heikki Linnakangas" <heikki@enterprisedb.com> writes: > Oh, I see what you mean. Yeah, the absolute paths need to be fixed Easier to just remove the regression test altogether. Not every patch requires permanent memorialization in a regression test. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
| ||||
| "Heikki Linnakangas" <heikki@enterprisedb.com> writes: > Here's a patch that fixes the send/recv functions to work like the > manual says. It fixes the free/pfree typo as well. Applied with a further fix: the patch caused xml_recv to call parse_xml_decl with a non-null-terminated string, which could in the worst case lead to a crash. > Included is a new regression test for the send/recv functions as well I didn't apply this, as it seemed more trouble than it was worth. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| Thread Tools | |
| Display Modes | |
|
|