Re: [HACKERS] proposal: use errcontext for custom exception too

2011-11-24 Thread Pavel Stehule
2011/11/25 Robert Haas : > On Thu, Nov 24, 2011 at 12:30 PM, Pavel Stehule > wrote: >> There are small issue in PL/pgSQL and custom exceptions. Custom >> exception doesn't set a CONTEXT field. I propose change this behave >> for WARNING or EXCEPTION level. The goal is same behave for custom >> ex

Re: [HACKERS] Storing hot members of PGPROC out of the band

2011-11-24 Thread Pavan Deolasee
On Thu, Nov 24, 2011 at 7:24 PM, Simon Riggs wrote: > On Thu, Nov 24, 2011 at 1:30 PM, Robert Haas wrote: > >> I'm going to run some more tests, but my thought is that we should >> probably leave the recentglobalxmin changes out for the time being, >> pending further study and consideration of ot

Re: [HACKERS] [PATCH] Support for foreign keys with arrays

2011-11-24 Thread Peter Eisentraut
On mån, 2011-11-21 at 10:30 -0600, Merlin Moncure wrote: > I like the idea of being able to define more flexible foreign keys, > but are we gilding the lily here? The proposed solution is really > quite specific to the nuances of arrays. Perhaps there is a more > general expression based syntax t

Re: [HACKERS] [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

2011-11-24 Thread NISHIYAMA Tomoaki
Hi, > The way to build natively with a mingw-w64 compiler is doumented fairly > simply at > : > > To build 64 bit binaries using MinGW, install the 64 bit tool set > from http://mingw-w6

Re: [HACKERS] [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

2011-11-24 Thread Andrew Dunstan
On 11/24/2011 04:39 AM, Lars Kanis wrote: > Can you please provide me with some howto on building PG sources with > mingw-w64? For 32/64 bit mingw-v4.6.1 on ubuntu 11.10: apt-get install flex gcc-mingw-w64 ./configure --host=i686-w64-mingw32 --build=x86_64-linux --without-zlib && make a

Re: [HACKERS] proposal: use errcontext for custom exception too

2011-11-24 Thread Robert Haas
On Thu, Nov 24, 2011 at 12:30 PM, Pavel Stehule wrote: > There are small issue in PL/pgSQL and custom exceptions. Custom > exception doesn't set a CONTEXT field. I propose change this behave > for WARNING or EXCEPTION level. The goal is same behave for custom > exception and builtin exception and

Re: [HACKERS] logging in high performance systems.

2011-11-24 Thread Robert Haas
On Wed, Nov 23, 2011 at 9:28 PM, Theo Schlossnagle wrote: > Thoughts? Feedback? Can you add it to the next CommitFest? https://commitfest.postgresql.org/action/commitfest_view/open -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-ha

Re: [HACKERS] proposal : backend startup hook / after logon trigger

2011-11-24 Thread Robert Haas
2011/11/10 Tomas Vondra : > Is there any particular reason why there's not a "backend start hook", > executed right after a backend is initialized? I've tried a very simple > PoC (basically just a new hook definition, called from PostgresMain(), > see the after-logon-hook.diff (and a simple module

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-11-24 Thread Peter Geoghegan
On 23 November 2011 19:24, Robert Haas wrote: > Well, right now the decision as to which mechanism should be used here > gets made in tuplesort_performsort(), which has no good way of > communicating with EXPLAIN anyway. You could pretty easily add something to Tuplesortstate to accomplish this.

Re: [HACKERS] [JDBC] Optimize postgres protocol for fixed size arrays

2011-11-24 Thread Oliver Jowett
On 25 November 2011 07:54, Mikko Tiihonen wrote: > <=BE ParameterStatus(binary_minor = 23) > FE=> Execute(SET binary_minor = 20) Yeah this was almost exactly what I was thinking about how to retrofit it, except it might be clearer to have, say, "supported_binary_minor" (read-only, advertised by

Re: [HACKERS] [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID

2011-11-24 Thread Thom Brown
On 24 November 2011 21:50, Alvaro Herrera wrote: > > Excerpts from Alvaro Herrera's message of vie nov 11 00:32:33 -0300 2011: >> Excerpts from Thom Brown's message of jue nov 10 21:28:06 -0300 2011: >> > >> > On 10 November 2011 23:56, Thom Brown wrote: >> >> > > The dump correctly contains: >>

Re: [HACKERS] PL/Python SQL error code pass-through

2011-11-24 Thread Jan Urbański
On 24/11/11 16:15, Heikki Linnakangas wrote: On 24.11.2011 10:07, Jan Urbański wrote: On 23/11/11 17:24, Mika Eloranta wrote: Hi all, [PL/Python in 9.1 does not preserve SQLSTATE of errors] Oops, you're right, it's a regression from 9.0 behaviour. The fix looks good to me, I changed one pla

Re: [HACKERS] [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID

2011-11-24 Thread Alvaro Herrera
Excerpts from Alvaro Herrera's message of vie nov 11 00:32:33 -0300 2011: > Excerpts from Thom Brown's message of jue nov 10 21:28:06 -0300 2011: > > > > On 10 November 2011 23:56, Thom Brown wrote: > > > > The dump correctly contains: > > > > > > CREATE TABLE a ( > > >    num integer, > > >  

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Peter Eisentraut
On tor, 2011-11-24 at 15:43 +0200, Alexander Shulgin wrote: > Huh? The service definitions are read from a local pg_service.conf, > and are specified by setting PGSERVICE (and PGSERVICEFILE) environment > variables, no? > > What would you do with such URI if you need to other people to connect >

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Peter Eisentraut
On tor, 2011-11-24 at 09:02 -0500, Robert Haas wrote: > e.g. if we used the format suggested in my previous email, this would > just boil down to: > > postgresql:///?service=foo More correct would be postgresql:?service=foo See http://en.wikipedia.org/wiki/URI_scheme for some inspiration. --

[HACKERS] Better implementation of CREATE TABLE AS ... WITH NO DATA

2011-11-24 Thread Tom Lane
In http://archives.postgresql.org/message-id/52ccaa8f414ba8anzai-na...@mxu.nes.nec.co.jp it's pointed out that our documentation claims the WITH [NO] DATA option works for all variants of CREATE TABLE AS. But in fact it's only implemented for the SelectStmt variant, not for the ExecuteStmt variant

Re: [HACKERS] Obstacles to user-defined range canonicalization functions

2011-11-24 Thread Jeff Davis
On Wed, 2011-11-23 at 22:33 -0500, Tom Lane wrote: > * The underlying range_serialize function is only exposed at the C > level. If you try to write something in, say, plpgsql then you are > going to end up going through range_constructorN or range_in to produce > your result value, and those call

Re: [HACKERS] [JDBC] Optimize postgres protocol for fixed size arrays

2011-11-24 Thread Mikko Tiihonen
On 11/24/2011 02:36 AM, Kevin Grittner wrote: Oliver Jowett wrote: Can we get a mechanism for minor protocol changes in this future version? Something as simple as exchanging a list of protocol features during the initial handshake (then use only features that are present on both sides) would

[HACKERS] proposal: use errcontext for custom exception too

2011-11-24 Thread Pavel Stehule
Hello There are small issue in PL/pgSQL and custom exceptions. Custom exception doesn't set a CONTEXT field. I propose change this behave for WARNING or EXCEPTION level. The goal is same behave for custom exception and builtin exception and it can help to identify a RAISE statement that is respons

Re: [HACKERS] Time bug with small years

2011-11-24 Thread Tom Lane
Robert Haas writes: > On Wed, Nov 23, 2011 at 11:45 PM, Rod Taylor wrote: >> sk_test=# select '1894-01-01'::timestamp with time zone; >> timestamptz >> -- >> 1894-01-01 00:00:00-05:17:32 >> (1 row) > On my system, all current time zone offsets are multiples

Re: [HACKERS] Wire protocol: type-specific opt-in to binary format

2011-11-24 Thread Tom Lane
Florian Weimer writes: > I would like to add functionality which allows a client to tell the > server which types can be sent in binary format. The immediate goal is > to suppress hex quoting for BYTEA values, but it seems to make sense to > make this functionality more general. > This doesn't h

Re: [HACKERS] Making TEXT NUL-transparent

2011-11-24 Thread Tom Lane
Andrew Dunstan writes: > On Thu, Nov 24, 2011 at 4:54 AM, Florian Weimer wrote: >> By the way, I refuse the notion that UTF-8 strings with embedded NULs >> are "broken". I can't recall any other system which enforces UTF-8 >> well-formedness, but does not permit embedded NULs. > Refuse away, bu

Re: [HACKERS] logging in high performance systems.

2011-11-24 Thread Theo Schlossnagle
On Wed, Nov 23, 2011 at 11:45 PM, Greg Smith wrote: > My assumption has been that eventually a lossy logger was going to be > necessary for busier sites, I just haven't been suffering from one enough to > hack on it yet.  If it's possible to work this out in enough detail to > figure out where the

Re: [HACKERS] RangeVarGetRelid()

2011-11-24 Thread Robert Haas
On Fri, Nov 18, 2011 at 9:12 AM, Noah Misch wrote: > Good call. All right, here's an updated patch, and a couple of follow-on patches. I updated the main patch (rangevargetrelid-callback-v2.patch) per previous discussion. I also added a "callback_arg" argument to the RangeVarGetRelidExtended(),

Re: [HACKERS] pg_upgrade relation OID mismatches

2011-11-24 Thread Bruce Momjian
Bruce Momjian wrote: > Heikki Linnakangas wrote: > > On 24.11.2011 07:01, Bruce Momjian wrote: > > > Bruce Momjian wrote: > > >> OK, that is a heap table. My only guess is that the heap is being > > >> created without binary_upgrade_next_heap_pg_class_oid being set. > > >> Looking at the code, I c

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alexander Shulgin
Excerpts from Robert Haas's message of Thu Nov 24 17:02:13 +0200 2011: > > On Thu, Nov 24, 2011 at 9:40 AM, Alexander Shulgin > wrote: > >> Another idea is to use local:/dir/name for UNIX domain socket instead of > >> hostname:port, like it's displayed in the psql prompt. > > > > So the whole t

Re: [HACKERS] PL/Python SQL error code pass-through

2011-11-24 Thread Heikki Linnakangas
On 24.11.2011 10:07, Jan Urbański wrote: On 23/11/11 17:24, Mika Eloranta wrote: Hi all, [PL/Python in 9.1 does not preserve SQLSTATE of errors] Oops, you're right, it's a regression from 9.0 behaviour. The fix looks good to me, I changed one place to indent with tabs instead of spaces and a

[HACKERS] tsvector term positions and character offset

2011-11-24 Thread Yoann Moreau
Hello, I'm working on text data, actually some tsvectors of the text. The tsvector provides terms and positions for each term, I would need to map these positions to the character offsets of the terms in the original text. 'This is an example text for example' tsvector -> 'an':3 'exampl':4,7 '

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Robert Haas
On Thu, Nov 24, 2011 at 9:40 AM, Alexander Shulgin wrote: >> Another idea is to use local:/dir/name for UNIX domain socket instead of >> hostname:port, like it's displayed in the psql prompt. > > So the whole thing would look like this: > >  postgresql://local:/dir/name/dbname?param1=val1&... > >

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Florian Weimer
* Alvaro Herrera: > Excerpts from Florian Weimer's message of jue nov 24 11:31:29 -0300 2011: >> >> * Alvaro Herrera: >> >> > I think we should just propose something that will not work in JDBC. >> >> I'm not sure if this is a good idea. 8-) >> >> I plan to add UNIX Domain socket support to th

Re: [HACKERS] Wire protocol: type-specific opt-in to binary format

2011-11-24 Thread Florian Weimer
* Florian Pflug: >>> If you use the extended query protocol, the client can already choose >>> text vs. binary representation on a per-column basis. You can query >>> the result's column types by issuing a Describe message after the >>> Parse message. For each column you can then decide whether y

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alexander Shulgin
Excerpts from Florian Weimer's message of Thu Nov 24 16:31:29 +0200 2011: > > I plan to add UNIX Domain socket support to the JDBC driver. > Eventually, the JDK will expose UNIX Domain sockets to Java code, too > (they are already used internally for management functions). Do you maybe plan to s

Re: [HACKERS] pg_upgrade relation OID mismatches

2011-11-24 Thread Bruce Momjian
Heikki Linnakangas wrote: > On 24.11.2011 07:01, Bruce Momjian wrote: > > Bruce Momjian wrote: > >> OK, that is a heap table. My only guess is that the heap is being > >> created without binary_upgrade_next_heap_pg_class_oid being set. > >> Looking at the code, I can't see how the heap could be cr

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alexander Shulgin
Excerpts from Robert Haas's message of Thu Nov 24 16:02:38 +0200 2011: > > > So, in that light, do we still think that letting the user specify a > > service name in the URI makes sense?  (My personal opinion is yes). > > service is just a connection parameter, so if we choose a URL format > tha

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alvaro Herrera
Excerpts from Florian Weimer's message of jue nov 24 11:31:29 -0300 2011: > > * Alvaro Herrera: > > > I think we should just propose something that will not work in JDBC. > > I'm not sure if this is a good idea. 8-) > > I plan to add UNIX Domain socket support to the JDBC driver. > Eventually,

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alexander Shulgin
Excerpts from Alexey Klyukin's message of Thu Nov 24 10:22:21 +0200 2011: > > Another idea is to use local:/dir/name for UNIX domain socket instead of > hostname:port, like it's displayed in the psql prompt. So the whole thing would look like this: postgresql://local:/dir/name/dbname?param1=

Re: [HACKERS] Wire protocol: type-specific opt-in to binary format

2011-11-24 Thread Florian Pflug
On Nov24, 2011, at 15:04 , Florian Weimer wrote: > * Florian Pflug: >> On Nov24, 2011, at 10:03 , Florian Weimer wrote: >>> I would like to add functionality which allows a client to tell the >>> server which types can be sent in binary format. The immediate goal is >>> to suppress hex quoting for

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Florian Weimer
* Alvaro Herrera: > I think we should just propose something that will not work in JDBC. I'm not sure if this is a good idea. 8-) I plan to add UNIX Domain socket support to the JDBC driver. Eventually, the JDK will expose UNIX Domain sockets to Java code, too (they are already used internally f

Re: [HACKERS] Wire protocol: type-specific opt-in to binary format

2011-11-24 Thread Florian Weimer
* Florian Pflug: > On Nov24, 2011, at 10:03 , Florian Weimer wrote: >> I would like to add functionality which allows a client to tell the >> server which types can be sent in binary format. The immediate goal is >> to suppress hex quoting for BYTEA values, but it seems to make sense to >> make t

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Robert Haas
On Thu, Nov 24, 2011 at 8:54 AM, Alvaro Herrera wrote: > Excerpts from Martijn van Oosterhout's message of jue nov 24 04:40:42 -0300 > 2011: > >> How about the "service" option, that's a nice way of handling >> non-default socket options. > > What about it?  Are you suggesting we should support s

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alexander Shulgin
Excerpts from Robert Haas's message of Thu Nov 24 15:59:08 +0200 2011: > > Well, based on that document, I think that trying to be bug-compatible > with the JDBC syntax is a, erm, doomed effort. I mean, what are you > going to do with things like loglevel or logUnclosedConnections that > change

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alvaro Herrera
Excerpts from Alvaro Herrera's message of jue nov 24 10:21:49 -0300 2011: > A coworker also suggested using a different designator: > > postgresqli:///path/to/socket:5433/database > postgresqli://:5433/database I forgot to mention: this "i" thing comes from LDAP. Apparently you can use "ldapi:

Re: [HACKERS] Wire protocol: type-specific opt-in to binary format

2011-11-24 Thread Florian Pflug
On Nov24, 2011, at 10:03 , Florian Weimer wrote: > I would like to add functionality which allows a client to tell the > server which types can be sent in binary format. The immediate goal is > to suppress hex quoting for BYTEA values, but it seems to make sense to > make this functionality more g

Re: [HACKERS] bug of recovery?

2011-11-24 Thread Simon Riggs
On Tue, Oct 4, 2011 at 7:43 AM, Fujii Masao wrote: > On Mon, Oct 3, 2011 at 4:32 PM, Simon Riggs wrote: >>> I don't think this should use the rm_safe_restartpoint machinery. As you >>> said, it's not tied to any specific resource manager. And I've actually been >>> thinking that we will get rid o

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Robert Haas
On Thu, Nov 24, 2011 at 8:50 AM, Alexander Shulgin wrote: > What JDBC supports is rather weird and far from being ideal: > http://jdbc.postgresql.org/documentation/head/connect.html > > The problem with supporting multiple syntaxes, IMO is that it makes libpq > compatible in only one direction:

Re: [HACKERS] Making TEXT NUL-transparent

2011-11-24 Thread Andrew Dunstan
On Thu, Nov 24, 2011 at 4:54 AM, Florian Weimer wrote: > > By the way, I refuse the notion that UTF-8 strings with embedded NULs > are "broken". I can't recall any other system which enforces UTF-8 > well-formedness, but does not permit embedded NULs. > > Refuse away, but I don't think you know

Re: [HACKERS] Storing hot members of PGPROC out of the band

2011-11-24 Thread Simon Riggs
On Thu, Nov 24, 2011 at 1:30 PM, Robert Haas wrote: > I'm going to run some more tests, but my thought is that we should > probably leave the recentglobalxmin changes out for the time being, > pending further study and consideration of other alternatives. Agreed --  Simon Riggs

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alvaro Herrera
Excerpts from Martijn van Oosterhout's message of jue nov 24 04:40:42 -0300 2011: > How about the "service" option, that's a nice way of handling > non-default socket options. What about it? Are you suggesting we should support some way to specify a service name in the URI? If so, consider th

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alvaro Herrera
Excerpts from Robert Haas's message of jue nov 24 10:35:36 -0300 2011: > On Thu, Nov 24, 2011 at 7:33 AM, Alexander Shulgin > wrote: > > > > Excerpts from Robert Haas's message of Thu Nov 24 13:57:17 +0200 2011: > >> > >> I think it would be really weird not to support user:pw@host:port.  You >

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alexander Shulgin
Excerpts from Robert Haas's message of Thu Nov 24 15:35:36 +0200 2011: > > > Do you suggest that we should reconsider? > > I guess my feeling is that if we're going to have URLs, we ought to > try to adhere to the same conventions that are used for pretty much > every other service that supports

Re: [HACKERS] Time bug with small years

2011-11-24 Thread Robert Haas
On Wed, Nov 23, 2011 at 11:45 PM, Rod Taylor wrote: > sk_test=# select '1894-01-01'::timestamp with time zone; > timestamptz > -- >  1894-01-01 00:00:00-05:17:32 > (1 row) I believe that -05:17:32 is the offset of your local time zone as compared with UTC. Fo

Re: [HACKERS] Making TEXT NUL-transparent

2011-11-24 Thread Florian Pflug
On Nov24, 2011, at 10:54 , Florian Weimer wrote: >> Or is it not only about being able to *store* NULs in a text field? > > No, the entire core should be NUL-transparent. That's unlikely to happen. A more realistic approach would be to solve this only for UTF-8 encoded strings by encoding the NUL

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alexander Shulgin
Excerpts from Alvaro Herrera's message of Thu Nov 24 15:21:49 +0200 2011: > > I think the question is allowing the URI to specify a service. Huh? The service definitions are read from a local pg_service.conf, and are specified by setting PGSERVICE (and PGSERVICEFILE) environment variables, no?

Re: [HACKERS] Making TEXT NUL-transparent

2011-11-24 Thread Robert Haas
On Thu, Nov 24, 2011 at 4:54 AM, Florian Weimer wrote: > By the way, I refuse the notion that UTF-8 strings with embedded NULs > are "broken".  I can't recall any other system which enforces UTF-8 > well-formedness, but does not permit embedded NULs. This seems like a key point. If UTF-8 allows

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Robert Haas
On Thu, Nov 24, 2011 at 7:33 AM, Alexander Shulgin wrote: > > Excerpts from Robert Haas's message of Thu Nov 24 13:57:17 +0200 2011: >> >> I think it would be really weird not to support user:pw@host:port.  You can >> presumably also support the JDBC style for backward compatibility, but I >> do

Re: [HACKERS] xpath_table

2011-11-24 Thread Robert Haas
On Tue, Nov 22, 2011 at 6:19 PM, magti...@juno.com wrote: > I noticed in the Postgres 9.1 manual that the xml2 module has been removed. No, it hasn't. We talked about it, but we didn't do it. We're still "planning" to remove it three releases ago. http://www.postgresql.org/docs/9.1/static/xml2

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alvaro Herrera
Excerpts from Alexander Shulgin's message of jue nov 24 05:58:57 -0300 2011: > Excerpts from Martijn van Oosterhout's message of Thu Nov 24 09:40:42 +0200 > 2011: > > Which does raise the valid question of how to represent that in URI > > syntax. SQLAlchemy (for example) doesn't try with it's U

Re: [HACKERS] pg_upgrade relation OID mismatches

2011-11-24 Thread Heikki Linnakangas
On 24.11.2011 07:01, Bruce Momjian wrote: Bruce Momjian wrote: OK, that is a heap table. My only guess is that the heap is being created without binary_upgrade_next_heap_pg_class_oid being set. Looking at the code, I can't see how the heap could be created without this happening. Another idea

Re: [HACKERS] Time bug with small years

2011-11-24 Thread Richard Huxton
On 24/11/11 04:45, Rod Taylor wrote: I have no idea what is going on with the minutes/seconds, particularly for years under 1895 where it gets appended onto the timezone component? sk_test=# select version(); version -

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alexander Shulgin
Excerpts from Robert Haas's message of Thu Nov 24 13:57:17 +0200 2011: > > I think it would be really weird not to support user:pw@host:port. You can > presumably also support the JDBC style for backward compatibility, but I > don't think we should adopt that syntax as project standard. Well,

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Robert Haas
On Nov 24, 2011, at 1:57 AM, Alexander Shulgin wrote: > While it is really tempting to provide support for all that fancy stuff (or > at least support "user:password@host" part instead of the ugly > "?user=&password=") this will make psql URIs backward-incompatible with the > JDBC syntax, which

Re: [HACKERS] Making TEXT NUL-transparent

2011-11-24 Thread Pavel Stehule
2011/11/24 Alexander Shulgin : > > Excerpts from Florian Weimer's message of Thu Nov 24 12:59:09 +0200 2011: >> >> > I have a different question. What is reason for embedded NULs inside >> > strings? >> >> The source system does not enforce that constraint, so from time to >> time, such data slips

Re: [HACKERS] Making TEXT NUL-transparent

2011-11-24 Thread Alexander Shulgin
Excerpts from Florian Weimer's message of Thu Nov 24 12:59:09 +0200 2011: > > > I have a different question. What is reason for embedded NULs inside > > strings? > > The source system does not enforce that constraint, so from time to > time, such data slips through. I don't know why it's there

Re: [HACKERS] [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

2011-11-24 Thread Lars Kanis
> Isn't it better to check the value of macros itsef rather than checking for > system dependent macros that does not directly relate to the issue? > specifically for getaddrinfo.c case I think > #if EAI_NODATA != EAI_NONAME > is a better check than checking for > #if !defined(__MINGW64_VERSION_MAJ

Re: [HACKERS] Making TEXT NUL-transparent

2011-11-24 Thread Florian Weimer
* Pavel Stehule: >> By the way, I refuse the notion that UTF-8 strings with embedded NULs >> are "broken".  I can't recall any other system which enforces UTF-8 >> well-formedness, but does not permit embedded NULs. > I have a different question. What is reason for embedded NULs inside > strings?

[HACKERS] Time bug with small years

2011-11-24 Thread Rod Taylor
I have no idea what is going on with the minutes/seconds, particularly for years under 1895 where it gets appended onto the timezone component? sk_test=# select version(); version Po

[HACKERS] xpath_table

2011-11-24 Thread magti...@juno.com
I noticed in the Postgres 9.1 manual that the xml2 module has been removed. I was looking to use the xpath_table functionality (making an xml doc look like a table so I could join it with other tables) but it looks like I can't. Is there another way to make an xml doc look like a table? Mike B

Re: [HACKERS] Making TEXT NUL-transparent

2011-11-24 Thread Pavel Stehule
2011/11/24 Florian Weimer : > * Alexander Shulgin: > >>> It's actually UTF-8 text, and some PostgreSQL functions are only >>> available for TEXT, but not BYTEA, e.g.: >>> >>> bfk_int=> SELECT '\x006500'::bytea ~ 'A'; >>> ERROR:  operator does not exist: bytea ~ unknown >> >> And how will those TEXT

Re: [HACKERS] Making TEXT NUL-transparent

2011-11-24 Thread Florian Weimer
* Alexander Shulgin: >> It's actually UTF-8 text, and some PostgreSQL functions are only >> available for TEXT, but not BYTEA, e.g.: >> >> bfk_int=> SELECT '\x006500'::bytea ~ 'A'; >> ERROR: operator does not exist: bytea ~ unknown > > And how will those TEXT functions behave on a value with an

Re: [HACKERS] Making TEXT NUL-transparent

2011-11-24 Thread Pavel Stehule
2011/11/24 Florian Weimer : > * Pavel Stehule: > >> Hello >> >> 2011/11/24 Florian Weimer : >>> Occasionally, we get bitten by embedded NUL bytes in TEXT values.  We >>> take care of generating proper UTF-8, but this additional restriction >>> sometimes slips by.  It would be really helpful if Post

Re: [HACKERS] [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

2011-11-24 Thread Lars Kanis
> Can you please provide me with some howto on building PG sources with > mingw-w64? For 32/64 bit mingw-v4.6.1 on ubuntu 11.10: apt-get install flex gcc-mingw-w64 ./configure --host=i686-w64-mingw32 --build=x86_64-linux --without-zlib && make and ./configure --host=x86_64-w64-mingw32 --build=x86

Re: [HACKERS] Making TEXT NUL-transparent

2011-11-24 Thread Alexander Shulgin
Excerpts from Florian Weimer's message of Thu Nov 24 11:27:51 +0200 2011: > > > and why you don't use bytea ? Text should be correct literal. > > It's actually UTF-8 text, and some PostgreSQL functions are only > available for TEXT, but not BYTEA, e.g.: > > bfk_int=> SELECT '\x006500'::bytea ~

Re: [HACKERS] Making TEXT NUL-transparent

2011-11-24 Thread Florian Weimer
* Pavel Stehule: > Hello > > 2011/11/24 Florian Weimer : >> Occasionally, we get bitten by embedded NUL bytes in TEXT values.  We >> take care of generating proper UTF-8, but this additional restriction >> sometimes slips by.  It would be really helpful if PostgreSQL could >> store such TEXT field

Re: [HACKERS] [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

2011-11-24 Thread Boszormenyi Zoltan
Hi, 2011-11-24 09:55 keltezéssel, Pavel Golub írta: > > Can you please provide me with some howto on building PG sources with > mingw-w64? Install Fedora 15 or 16, add this repo file into /etc/yum.repos.d : http://build1.openftd.org/fedora-cross/fedora-cross.repo Then "yum install mingw*". Thi

Re: [HACKERS] Making TEXT NUL-transparent

2011-11-24 Thread Pavel Stehule
Hello 2011/11/24 Florian Weimer : > Occasionally, we get bitten by embedded NUL bytes in TEXT values.  We > take care of generating proper UTF-8, but this additional restriction > sometimes slips by.  It would be really helpful if PostgreSQL could > store such TEXT fields as-is (at least if they a

[HACKERS] Making TEXT NUL-transparent

2011-11-24 Thread Florian Weimer
Occasionally, we get bitten by embedded NUL bytes in TEXT values. We take care of generating proper UTF-8, but this additional restriction sometimes slips by. It would be really helpful if PostgreSQL could store such TEXT fields as-is (at least if they are computed internally, or come from query

[HACKERS] Wire protocol: type-specific opt-in to binary format

2011-11-24 Thread Florian Weimer
I would like to add functionality which allows a client to tell the server which types can be sent in binary format. The immediate goal is to suppress hex quoting for BYTEA values, but it seems to make sense to make this functionality more general. This doesn't have to be a flag on the wire proto

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alexander Shulgin
Excerpts from Martijn van Oosterhout's message of Thu Nov 24 09:40:42 +0200 2011: > On Thu, Nov 24, 2011 at 08:59:56AM +0200, Alexander Shulgin wrote: > > > How would you specifiy a local port/UNIX domain socket? > > > > Missed that in my previous reply. > > > > If host part of the URI points t

Re: [HACKERS] [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

2011-11-24 Thread Pavel Golub
Hello, Lars. You wrote: LK> Hi PostgreSQL hackers, LK> LK> support for Mingw-w64 compiler was added to postgres with commit LK> 91812df. Unfortunately only the 64 bit output is working right LK> now. This issue was already highlighted with initial patch in LK> http://archives.postgresql.org/pgs

Re: [HACKERS] [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

2011-11-24 Thread NISHIYAMA Tomoaki
Hi, Isn't it better to check the value of macros itsef rather than checking for system dependent macros that does not directly relate to the issue? specifically for getaddrinfo.c case I think #if EAI_NODATA != EAI_NONAME is a better check than checking for #if !defined(__MINGW64_VERSION_MAJOR) &&

[HACKERS] [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

2011-11-24 Thread Lars Kanis
Hi PostgreSQL hackers, support for Mingw-w64 compiler was added to postgres with commit 91812df. Unfortunately only the 64 bit output is working right now. This issue was already highlighted with initial patch in http://archives.postgresql.org/pgsql-bugs/2011-07/msg00059.php Mingw-w64 uses the

Re: [HACKERS] Notes on implementing URI syntax for libpq

2011-11-24 Thread Alexey Klyukin
On Nov 24, 2011, at 9:40 AM, Martijn van Oosterhout wrote: > On Thu, Nov 24, 2011 at 08:59:56AM +0200, Alexander Shulgin wrote: >>> How would you specifiy a local port/UNIX domain socket? >> >> Missed that in my previous reply. >> >> If host part of the URI points to localhost, the UNIX domain

Re: [HACKERS] PL/Python SQL error code pass-through

2011-11-24 Thread Jan Urbański
On 23/11/11 17:24, Mika Eloranta wrote: Hi all, [PL/Python in 9.1 does not preserve SQLSTATE of errors] Oops, you're right, it's a regression from 9.0 behaviour. The fix looks good to me, I changed one place to indent with tabs instead of spaces and added a regression test. I think this sh