Re: [GENERAL] Stored Procedure Assistance

2003-07-08 Thread Richard Huxton
On Tuesday 08 Jul 2003 5:55 pm, Bradley J. Bartram wrote: The first query is simple: SELECT a FROM table_a WHERE column_a = b This will return a single row. The next query takes that derived value and does a simliar select that returns multiple rows. SELECT c FROM table_b WHERE column_b =

[GENERAL] Is Postgres broken in Red Hat 9?

2003-07-08 Thread Dragan Matic
Hi, there is a small problem here I have, I would appreciate any suggestion. We were using Postgres 7.2.x and later 7.3.x under Red Hat 8, and everything worked fine. Clients are working under windows and are communicating to Postgres via ODBC. This weekend we tried to upgrade to Red Hat

Re: [GENERAL] Is Postgres broken in Red Hat 9?

2003-07-08 Thread scott.marlowe
On Tue, 8 Jul 2003, Dragan Matic wrote: Hi, there is a small problem here I have, I would appreciate any suggestion. We were using Postgres 7.2.x and later 7.3.x under Red Hat 8, and everything worked fine. Clients are working under windows and are communicating to Postgres via

Re: [GENERAL] Is Postgres broken in Red Hat 9?

2003-07-08 Thread Richard Huxton
On Tuesday 08 Jul 2003 6:38 pm, Dragan Matic wrote: Hi, there is a small problem here I have, I would appreciate any suggestion. We were using Postgres 7.2.x and later 7.3.x under Red Hat 8, and everything worked fine. Clients are working under windows and are communicating to Postgres

Re: [GENERAL] Is Postgres broken in Red Hat 9?

2003-07-08 Thread Richard Huxton
On Tuesday 08 Jul 2003 6:38 pm, Dragan Matic wrote: We were using Postgres 7.2.x and later 7.3.x under Red Hat 8, and everything worked fine. Clients are working under windows and are communicating to Postgres via ODBC. Oh - one thing you need to know - there was an extra column

Re: [GENERAL] Is Postgres broken in Red Hat 9?

2003-07-08 Thread Richard Welty
On Tue, 8 Jul 2003 11:40:15 -0600 (MDT) scott.marlowe [EMAIL PROTECTED] wrote: You may have a firewall setup to block all ports by default. firewall-config or something like it was the name of the firewall config util in 7.2. in recent redhats, this is likely it. sudo /sbin/ipchains -L

Re: [GENERAL] SQL Functions and plan time

2003-07-08 Thread Tom Lane
Richard Huxton [EMAIL PROTECTED] writes: Can I ask why, since the plan is constructed at query-time the parameters aren't substitued *before* planning? Because then the plan couldn't be re-used. A SQL function may be executed many times in a query, so the plan has to be reusable. (Or, if you

Re: [GENERAL] Transaction Blocks

2003-07-08 Thread Jay O'Connor
On 2003.07.07 11:56 Mat wrote: I believe that its more efficient to group INSERT's together and COMMIT them in groups. However, I am automatically entering a lot of data and some of its is not unique. How can I reap the benefits of using BEGIN and COMMIT without the whole block of

Re: [GENERAL] Website (DNS) is hosed!!!

2003-07-08 Thread The Hermit Hacker
On Tue, 8 Jul 2003, Andrew Sullivan wrote: On Mon, Jul 07, 2003 at 08:39:13PM -0500, Daniel Armbrust wrote: Do you realize your entire website is hosed? NONE of the download sites will resolve, and NONE of the mirror sites work (or will resolve). What is up? Maybe you have a bad

Re: [GENERAL] PG crash on simple query, story continues

2003-07-08 Thread Maksim Likharev
Hi, I have very interesting suspicion: See my comments ! convert_string_datum ... !this is my case if (!lc_collate_is_c()) { /* Guess that transformed string is not much bigger than original */ xfrmsize = strlen(val) + 32;/* arbitrary

Re: [GENERAL] PG crash on simple query, story continues

2003-07-08 Thread Tom Lane
Maksim Likharev [EMAIL PROTECTED] writes: ! I would say very interesting aproach, ! why not just xfrmsize = strxfrm(xfrmstr, NULL, 0); strxfrm doesn't work that way (and if it did, it would give back a malloc'd not a palloc'd string).

Re: [GENERAL] PG crash on simple query, story continues

2003-07-08 Thread Maksim Likharev
!if error happend, xfrmlen will be (size_t)-1 No it won't; see the man page for strxfrm. RETURN VALUES Upon successful completion, strxfrm() returns the length of the transformed string (not including the terminating null byte). If the value returned is n or more,

[GENERAL] C Triggers Cancelling Transactions?

2003-07-08 Thread Clay Luther
My initial impression is that AFTER triggers written in C cannot abort the wrapping transaction if an error occurs. Is this correct? --- Clay Cisco Systems, Inc. [EMAIL PROTECTED] (972) 813-5004 I've stopped 15,797 spam messages. You can too! One month FREE spam protection at

Re: [GENERAL] C Triggers Cancelling Transactions?

2003-07-08 Thread Stephan Szabo
On Tue, 8 Jul 2003, Clay Luther wrote: My initial impression is that AFTER triggers written in C cannot abort the wrapping transaction if an error occurs. Is this correct? After triggers can still raise an exception condition to abort the transaction with elog. They can't quietly change or

[GENERAL] Statistics on a table

2003-07-08 Thread Maksim Likharev
Hi, I just found very interesting situation, statistic ( n_distinct in particular) records for one of my columns, greatly under calculated it saying: 49726, but in reality 33409816. So planer never choose index but rather using table scan, and query never returns, is it any way how I can improve

[GENERAL] where is the list of companies that provide commercial support?

2003-07-08 Thread Joseph Shraibman
The link at the end of 1.6 in the faq does not work. ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the

Re: [pgsql-advocacy] [HACKERS] [GENERAL] Postgresql AMD x86-64

2003-07-08 Thread Bruce Momjian
The s_lock.h change will be in 7.4. --- Tom Lane wrote: Martin D. Weinberg [EMAIL PROTECTED] writes: I didn't change the source tree at all. I used: env CFLAGS='-O3 -m64' LD='/usr/bin/ld -melf_x86_64' ./configure

Re: [pgsql-advocacy] [HACKERS] [GENERAL] Postgresql AMD x86-64

2003-07-08 Thread Bruce Momjian
Interesting. The compiler doesn't do x86_64 by default --- you have to enable it in the compile. Any idea how to handle this in our builds? It doesn't seem like a property of the OS as much as a property of the compiler --- we already do 64-bit on some platforms without flags. What is the

Re: [GENERAL] PG crash on simple query, story continues

2003-07-08 Thread Tom Lane
Maksim Likharev [EMAIL PROTECTED] writes: On failure, strxfrm() returns (size_t)-1. Not according to the Single Unix Specification, Linux, or HP-UX; I don't have any others to check. But anyway, that is not causing your problem, since palloc(0) would complain not dump core. I am on SunOS

Re: [GENERAL] PG crash on simple query, story continues

2003-07-08 Thread Maksim Likharev
I would referrer dump that gar.xxg, and put PG on Linux, but this is not up to me. Thanks for the help. -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 3:58 PM To: Maksim Likharev Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [GENERAL] PG

[GENERAL] DISTINCT vs EXISTS performance

2003-07-08 Thread Joseph Shraibman
I have a query where I want to select the usertable records that have a matching entry in an event table. There are two ways to do this. 1) SELECT COUNT(DISTINCT u.uid) FROM usertable u, eventlog e WHERE u.uid = e.uid AND e.type = XX; 2) SELECT COUNT(u.uid) FROM usertable u WHERE EXISTS(SELECT

Re: [GENERAL] Restoring a postgres database

2003-07-08 Thread Andrew Gould
--- Timothy Brier [EMAIL PROTECTED] wrote: Hi, I've run in to this problem with a database we are working. When I restore a database schema, I need to restore the schema 5 times to ensure that the schema is complete. Also some of the sequences are not restored in a usable form.

Re: [GENERAL] Restoring a postgres database

2003-07-08 Thread Timothy Brier
Andrew Gould wrote: --- Timothy Brier [EMAIL PROTECTED] wrote: Hi, I've run in to this problem with a database we are working. When I restore a database schema, I need to restore the schema 5 times to ensure that the schema is complete. Also some of the sequences are not restored in a

[GENERAL] Native dataprovider on Windows

2003-07-08 Thread adivi
Hi, are there any Windows based native data providers for PostGreSql that can be used from .Net applications other than Mono regards-adivi

[GENERAL] PostgreSQL Advocacy Fund and New Banner Ads

2003-07-08 Thread The Hermit Hacker
POSTGRESQL ADVOCACY FUND Robert Treat has been selected by the Core Team as Treasurer for our new PostgreSQL Advocacy Fund. Robert will soon be setting up an account in the U.S. for receiving donations for the promotion of PostgreSQL. This fund will be used primarily to print promotional