[HACKERS] -X flag in pg_dump

2006-01-26 Thread Dennis Bjorklund
What use is the -X flag to pg_dump. The code say that if one add a setting feature to -X then there should also be a flag --feature. So we have for example: -X disable-triggers and --disable-triggers If all the -X flags come in a long form as well, then what use is the -X at all? Why

Re: [HACKERS] PostgreSQL Solaris packages now in beta

2006-01-26 Thread Bruce Momjian
Robert Lor wrote: Bruce, The binary was compiled in 32bit mode using Sun Studio compiler, and we plan to do 64bit soon. Can you point me to the patch? We can certainly test it! Download CVS HEAD and give it a try. The file that was created for the port is

[HACKERS]

2006-01-26 Thread Ewa Papuga
unsubscribe ---(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

Re: [HACKERS] -X flag in pg_dump

2006-01-26 Thread Bruce Momjian
Dennis Bjorklund wrote: What use is the -X flag to pg_dump. The code say that if one add a setting feature to -X then there should also be a flag --feature. So we have for example: -X disable-triggers and --disable-triggers If all the -X flags come in a long form as well,

Re: [HACKERS] debug_query_string and multiple statements

2006-01-26 Thread William ZHANG
If we want to save the SQL statement for some database objects(table, view, etc.), the backend will see the same problem. Here is an example. create table s(sno int, sname char(10)); select 1; I recall that some DBMS will store the statement for table s like this: create table s(sno int,

Re: [HACKERS] GRANT/REVOKE: Allow column-level privileges

2006-01-26 Thread William ZHANG
I think we should pay attention to the sematic of table privs and column privs. Here is some examples. 1. role1 GRANT table priviledge SELECT on table S to role2. role1 REVOKE column priviledge SELECT on column S(SNO) from role2. 2. deal with circles in GRANT graph. kevin brintnall [EMAIL

Re: [HACKERS] Cleaning up the INET/CIDR mess

2006-01-26 Thread Greg Stark
Andrew - Supernews [EMAIL PROTECTED] writes: The spec is quite explicit that inet_pton is not expected to accept the abbreviated forms or any non-decimal values. Hum. That distinctly doesn't match my memory but it seems you're right. The spec mandates inet_ntoa and inet_addr support it but not

Re: [HACKERS] Cleaning up the INET/CIDR mess

2006-01-26 Thread Steve Atkins
On Jan 25, 2006, at 9:29 AM, Bruce Momjian wrote: Tom Lane wrote: Greg Stark [EMAIL PROTECTED] writes: I wonder if this would be an opportunity to fix Postgres's handling of addresses like '10.1'. You've mistaken this for a proposal to change the I/O behavior, which it is specifically

Re: [HACKERS] Rollback Mountain

2006-01-26 Thread Bricklen Anderson
Michael Fuhr wrote: Rollback Mountain A raw, powerful story of two young transactions, one serializable and the other read-committed, who meet in the summer of 2005 updating tables in the harsh, high-volume environment of a contemporary online trading system and form an unorthodox yet

Re: [HACKERS] [GENERAL] [PATCH] Better way to check for getaddrinfo

2006-01-26 Thread Bruce Momjian
I am not sure what to do on this. Right now we have a one-line test: AC_REPLACE_FUNCS([getaddrinfo]) To test for a macro we are going to need to add include netdb.h, and the LINK test below is overkill. I am thinking we should just hard-code in HAVE_GETADDRINFO for the True64 platform;

Re: [HACKERS] Backslashes in string literals

2006-01-26 Thread Kevin Grittner
On Wed, Jan 25, 2006 at 4:46 pm, in message [EMAIL PROTECTED], Kevin Grittner [EMAIL PROTECTED] wrote: (2) There should probably be some tests added to exercise these options. Attached is a patch to address this one. Note that until psql is fixed, this test will fail. I manually

Re: [HACKERS] [GENERAL] [PATCH] Better way to check for getaddrinfo

2006-01-26 Thread Tom Lane
Bruce Momjian pgman@candle.pha.pa.us writes: I am not sure what to do on this. Right now we have a one-line test: AC_REPLACE_FUNCS([getaddrinfo]) To test for a macro we are going to need to add include netdb.h, and the LINK test below is overkill. I am thinking we should just hard-code

Re: [HACKERS] [GENERAL] [PATCH] Better way to check for getaddrinfo

2006-01-26 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian pgman@candle.pha.pa.us writes: I am not sure what to do on this. Right now we have a one-line test: AC_REPLACE_FUNCS([getaddrinfo]) To test for a macro we are going to need to add include netdb.h, and the LINK test below is overkill. I am thinking we

Re: [HACKERS] [GENERAL] [PATCH] Better way to check for getaddrinfo

2006-01-26 Thread Tom Lane
Bruce Momjian pgman@candle.pha.pa.us writes: I have the answer. Tru64 netdb.h has: #if defined (_SOCKADDR_LEN) || defined (_XOPEN_SOURCE_EXTENDED) #define getaddrinfo ngetaddrinfo #else #define getaddrinfo ogetaddrinfo #endif Seems like the same method we use

Re: [HACKERS] -X flag in pg_dump

2006-01-26 Thread Peter Eisentraut
Dennis Bjorklund wrote: If all the -X flags come in a long form as well, then what use is the -X at all? Why would one want to use -X disable-triggers instead of --disable-triggers ? This was added before we had portable long options. I suppose we could phase it out. -- Peter Eisentraut

Re: [HACKERS] -X flag in pg_dump

2006-01-26 Thread Andrew Dunstan
Peter Eisentraut wrote: Dennis Bjorklund wrote: If all the -X flags come in a long form as well, then what use is the -X at all? Why would one want to use -X disable-triggers instead of --disable-triggers ? This was added before we had portable long options. I suppose we could

Re: [HACKERS] Cleaning up the INET/CIDR mess

2006-01-26 Thread Peter Eisentraut
Tom Lane wrote: Without the flag, it's okay for cidr-to-inet to be a binary-compatible (no function) conversion. However, inet-to-cidr has to either zero out bits to the right of the netmask, or error out if any are set. Joachim Wieland posted a patch that makes the coercion function just

Re: [HACKERS] -X flag in pg_dump

2006-01-26 Thread Bruce Momjian
Peter Eisentraut wrote: Dennis Bjorklund wrote: If all the -X flags come in a long form as well, then what use is the -X at all? Why would one want to use -X disable-triggers instead of --disable-triggers ? This was added before we had portable long options. I suppose we could phase

Re: [HACKERS] Cleaning up the INET/CIDR mess

2006-01-26 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Tom Lane wrote: Without the flag, it's okay for cidr-to-inet to be a binary-compatible (no function) conversion. However, inet-to-cidr has to either zero out bits to the right of the netmask, or error out if any are set. Joachim Wieland posted a

Re: [HACKERS] Cleaning up the INET/CIDR mess

2006-01-26 Thread Bruce Momjian
Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: Tom Lane wrote: Without the flag, it's okay for cidr-to-inet to be a binary-compatible (no function) conversion. However, inet-to-cidr has to either zero out bits to the right of the netmask, or error out if any are set.

Re: [HACKERS] Adding a --quiet option to initdb

2006-01-26 Thread Jim C. Nasby
On Thu, Jan 26, 2006 at 11:36:15AM +0100, Peter Eisentraut wrote: James William Pye wrote: Why should initdb give it [processing information] to the user if the user didn't request it in the first place? Because it shows important information that we want the user to see. Plus it can be

Re: [HACKERS] Adding a --quiet option to initdb

2006-01-26 Thread Andrew Dunstan
Jim C. Nasby wrote: On Thu, Jan 26, 2006 at 11:36:15AM +0100, Peter Eisentraut wrote: James William Pye wrote: Why should initdb give it [processing information] to the user if the user didn't request it in the first place? Because it shows important information that we want

Re: [HACKERS] Cleaning up the INET/CIDR mess

2006-01-26 Thread Peter Eisentraut
Bruce Momjian wrote: I agree. Let's do the zeroing and see if people complain about it. I'm complaining. Losing data on a cast is not common behavior. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9:

[HACKERS] A note about testing EXEC_BACKEND on recent Linuxen

2006-01-26 Thread Tom Lane
I just wasted a couple hours trying to determine why an EXEC_BACKEND build would randomly fail on Fedora Core 4. It seems the reason is that by default, recent Linux kernels randomize the stack base address --- not by a lot, but enough to cause child processes to sometimes be unable to attach to

Re: [HACKERS] Suggestions for post-mortem...

2006-01-26 Thread Philip Warner
Tom Lane wrote: Define die quite nastily ... you haven't really said what went wrong. We lost data from this table, and ended up with transactions rolled back that were in fact committed (ie. data was in DB, program code thought they were rolled back). End result was we deemed the database

[HACKERS] Proposal: new pg_dump options --copy-delimiter and --copy-null

2006-01-26 Thread David Fetter
Folks, This came up at work... I have seed database scripts quasi-generated from pg_dump which include COPY statements, but the data is hard to edit (especially cut paste operations) when the COPY delimiter is some non-visible character like \t. So I thought it would be handy to be able to

Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and --copy-null

2006-01-26 Thread Tom Lane
David Fetter [EMAIL PROTECTED] writes: I have seed database scripts quasi-generated from pg_dump which include COPY statements, but the data is hard to edit (especially cut paste operations) when the COPY delimiter is some non-visible character like \t. This seems like an awfully weak

Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and --copy-null

2006-01-26 Thread David Fetter
On Thu, Jan 26, 2006 at 10:17:05PM -0500, Tom Lane wrote: David Fetter [EMAIL PROTECTED] writes: I have seed database scripts quasi-generated from pg_dump which include COPY statements, but the data is hard to edit (especially cut paste operations) when the COPY delimiter is some