Re: [HACKERS] cast from integer to money

2011-04-03 Thread Joseph Adams
On Sun, Apr 3, 2011 at 11:23 PM, Robert Haas wrote: > Thanks for the patch, but I think you forgot to worry about overflow: > > rhaas=# select 9223372036854775807::money; >  money > >  -$1.00 > (1 row) cash_in doesn't test for overflow, either (tested on 8.4.0, 9.0.3, and HEAD): joey=#

Re: [HACKERS] cast from integer to money

2011-04-03 Thread Tom Lane
Robert Haas writes: > On Fri, Apr 1, 2011 at 10:33 PM, Joseph Adams > wrote: >> The only other numeric types (other than oid, cardinal_number, >> etc.) that can't be casted directly to money are float4 and float8, >> and I suspect this is intentional. > Agreed. BTW, I think inclusion of int2 in

Re: [HACKERS] Finding a flow when query is fired in postgresql

2011-04-03 Thread Robert Haas
On Sat, Apr 2, 2011 at 5:41 AM, bschaudhari972 wrote: > i edited postgreql file so that i can check the flow of .c files invoked when > we fire a query but only what i am getting is just parse trees ,rewritten > trees and plan but no names of .c files invoked... > plz help me asap ...its very impo

Re: [HACKERS] cast from integer to money

2011-04-03 Thread Robert Haas
On Fri, Apr 1, 2011 at 10:33 PM, Joseph Adams wrote: > On Thu, Mar 31, 2011 at 6:39 PM, Stephen Frost wrote: >> Going just integer->money, with the "1" -> "$1.00", seems completely >> reasonable to me.  As for being too late in the cycle..  if someone's >> willing to do the work, I can't imagine

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-04-03 Thread Robert Haas
On Fri, Apr 1, 2011 at 12:56 AM, Noah Misch wrote: > On Thu, Mar 31, 2011 at 11:11:49AM -0400, Robert Haas wrote: >> On Thu, Mar 31, 2011 at 6:06 AM, Noah Misch wrote: >> >> I think this is a manifestation the same problem mentioned here: >> >> >> >> http://git.postgresql.org/gitweb?p=postgresql.

Re: [HACKERS] maximum digits for NUMERIC

2011-04-03 Thread Robert Haas
On Fri, Apr 1, 2011 at 7:51 AM, Noah Misch wrote: > On Fri, Apr 01, 2011 at 11:44:23AM +0100, Gianni Ciolli wrote: >> Please find attached v2 of the numeric-doc patch, which takes into >> account your remarks. In particular, numeric limits are now correct >> and documented only in that table. > >

Re: [HACKERS] [DOCS] found a very confusing and maybe outdated sentence

2011-04-03 Thread Robert Haas
On Sat, Apr 2, 2011 at 3:31 AM, Susanne Ebrecht wrote: >>> Is "man" really working on Windows? >>> >>> Also the sentence says that the whole product isn't correct >>> installed just because docs aren't installed. Which also isn't >>> really true. >>> >>> Honesty, I just would like to drop the whol

Re: [HACKERS] corner case about replication and shutdown

2011-04-03 Thread Robert Haas
On Sat, Apr 2, 2011 at 4:51 AM, Fujii Masao wrote: > On Fri, Apr 1, 2011 at 11:11 PM, Robert Haas wrote: >> On Thu, Mar 31, 2011 at 11:12 PM, Fujii Masao wrote: >>> Another simple fix is to make walsender send SIGUSR1 to postmaster >>> so that it calls PostmasterStateMachine() in sigusr1_handler

Re: [HACKERS] Process local hint bit cache

2011-04-03 Thread Merlin Moncure
On Sat, Apr 2, 2011 at 8:37 PM, Tom Lane wrote: > Merlin Moncure writes: >> On Thu, Mar 31, 2011 at 5:38 PM, Merlin Moncure wrote: >>> working on exanding the cache to # xid > 1. > >> patch attached.  this is essentially my original idea except it's >> injected directly in to tqual.c as a kind o

Re: GUC assign hooks (was Re: [HACKERS] wal_buffers = -1 and SIGHUP)

2011-04-03 Thread Tom Lane
Robert Haas writes: > On Sun, Apr 3, 2011 at 1:26 PM, Tom Lane wrote: >> IMO the real problem is essentially that GUC assign hooks have two >> functions, checking and canonicalization of the value-to-be-stored >> versus executing secondary actions when an assignment is made; and >> there's no way

Re: GUC assign hooks (was Re: [HACKERS] wal_buffers = -1 and SIGHUP)

2011-04-03 Thread Robert Haas
On Sun, Apr 3, 2011 at 1:26 PM, Tom Lane wrote: > IMO the real problem is essentially that GUC assign hooks have two > functions, checking and canonicalization of the value-to-be-stored > versus executing secondary actions when an assignment is made; and > there's no way to get at just the first o

[HACKERS] PG 9.0.3. How to select rows from xml

2011-04-03 Thread emanov
Hi all! What i need is transform xml document to table like that: insert into tmp("Name", "Value") select t.Name, t.Value from myxml.Nodes("/doc/person") as t('Name:varchar|Value:int') or similar. In fact I have many rows with many columns. How I can do it with PG 9.0.3 where I can't find xpath_ta

Re: [HACKERS] FDW state from plan time

2011-04-03 Thread Heikki Linnakangas
On 03.04.2011 19:38, Tom Lane wrote: Dave Page writes: I can't help thinking I must be missing something obvious here, but is there any way to persist some data from PlanForeignScan to at least BeginForeignScan in an FDW? I'm aware of fdwplan->fdw_private, but at that needs to be copyObject com

GUC assign hooks (was Re: [HACKERS] wal_buffers = -1 and SIGHUP)

2011-04-03 Thread Tom Lane
I wrote: > Robert Haas writes: >> I had intended to commit Greg's patch with a show hook and an assign >> hook and the calculated value stored separately from the GUC variable, >> which I believe would avoid this is a problem, but Tom thought this >> way was better. Unfortunately, my knowledge of

[HACKERS] Compiling a static libpq

2011-04-03 Thread Julia Jacobson
Dear PostgreSQL developers, After having done extensive web search and not found anybody to solve the problem of interest on the general PostgreSQL mailing list, in the PostgreSQL newsgroup on usenet or on the PostgreSQL IRC channel, I would like to ask you how to compile a static libpq workin

Re: [HACKERS] Should psql support URI syntax?

2011-04-03 Thread Tom Lane
Peter Eisentraut writes: > Well, there isn't any requirement that URIs be > prot://hostname:port/something > They just have to be > prot:something > So you could just turn the existing conninfo syntax into a URI by doing > something like > postgresql:dbname=foo%20hostname=bar True, but the n

Re: [HACKERS] FDW state from plan time

2011-04-03 Thread Tom Lane
Dave Page writes: > I can't help thinking I must be missing something obvious here, but is > there any way to persist some data from PlanForeignScan to at least > BeginForeignScan in an FDW? I'm aware of fdwplan->fdw_private, but at > that needs to be copyObject compatible, it's not much use to me

Re: [HACKERS] Windows build issues

2011-04-03 Thread Magnus Hagander
On Thu, Mar 31, 2011 at 22:10, Peter Eisentraut wrote: > On tor, 2011-03-31 at 16:00 -0400, Andrew Dunstan wrote: >> >> On 03/31/2011 03:38 PM, Peter Eisentraut wrote: >> > So is 2010 supported, and where is the vcbuild program supposed to come >> > from? >> > >> >> >> Not that I know of. But VS 2

Re: [HACKERS] psql 9.1 alpha5: connection pointer is NULL

2011-04-03 Thread Devrim GÜNDÜZ
On Sat, 2011-04-02 at 18:10 -0400, Tom Lane wrote: > > It could explain Devrim's report if the parameters passed by psql had > some problem that was detectable by conninfo_array_parse(). That > seems a bit unlikely, but I did think of one possibility: if Devrim > was > testing 9.1 psql with a 9.0

Re: [HACKERS] Should psql support URI syntax?

2011-04-03 Thread Peter Eisentraut
On fre, 2011-04-01 at 09:12 +0200, Adrian von Bidder wrote: > Since URI stings are popular, it might really make sense if pg could > recommend a preferred form of postgres URI strings (and obviously > implement it in libpq). For the non-libpq APIs (there's at least > http://python.projects.postg

[HACKERS] FDW state from plan time

2011-04-03 Thread Dave Page
Hi, I can't help thinking I must be missing something obvious here, but is there any way to persist some data from PlanForeignScan to at least BeginForeignScan in an FDW? I'm aware of fdwplan->fdw_private, but at that needs to be copyObject compatible, it's not much use to me. The issue I have is