Re: [GENERAL] PQexec(), what should I do for the NULL in command problem?

2007-11-13 Thread yang zhenyu
- out of line parameters How to? Is there any function for this? I mean the C interface. PQexecParams. - escape the nulls, like \0 Do you mean this function? #unsigned char *PQescapeBytea(const unsigned char *from, # size_t from_length, #

Re: [GENERAL] (Never?) Kill Postmaster?

2007-11-13 Thread Christian Schröder
Tom Lane wrote: Hah, I've got it. (Should have searched Red Hat's bugzilla sooner.) What you are hitting is a glibc bug, as explained here: http://sources.redhat.com/ml/libc-hacker/2007-10/msg00010.html If libpthread is loaded after first use of dcgettext, then subsequent uses are at risk of

Re: [GENERAL] (Never?) Kill Postmaster?

2007-11-13 Thread Martijn van Oosterhout
On Tue, Nov 13, 2007 at 02:08:47PM +0100, Christian Schröder wrote: By the way, does the --enable-thread-safety switch have anything to do with the problem? No, that only affects the client library, it doesn't affect the server... Have a nice day, -- Martijn van Oosterhout [EMAIL

Re: [GENERAL] Calculation for Max_FSM_pages : Any rules of thumb?

2007-11-13 Thread Bill Moran
In response to Ow Mun Heng [EMAIL PROTECTED]: On Thu, 2007-11-08 at 12:02 -0500, Bill Moran wrote: Frequently, when people ask for help because they've exceed max_fsm*, it's because they're not paying attention to their systems, and therefore the problem has been occurring for a while

Re: [GENERAL] FreeBSD portupgrade of 8.1 - 8.2

2007-11-13 Thread Vivek Khera
On Nov 12, 2007, at 8:55 PM, Steve Manes wrote: Steve Manes wrote: What's the portupgrade process in FreeBSD?? (Fixed. The answer is to use pg_delete -f on the old package to force the delete) more elegantly, portupgrade -Rrv -f -o databases/postgresql82-client postgresql-client but

Re: [GENERAL] Linux v.s. Mac OS-X Performance

2007-11-13 Thread Scott Ribe
my understanding was that the lack of threading on OSX made it especially poor for a DB server What you're referring to must be that the kernel was essentially single-threaded, with a single kernel-funnel lock. (Because the OS certainly supported threads, and it was certainly possible to write

Re: [GENERAL] (Never?) Kill Postmaster?

2007-11-13 Thread Tom Lane
=?ISO-8859-1?Q?Christian_Schr=F6der?= [EMAIL PROTECTED] writes: What remains inscrutable to me is why this problem did not arise earlier. I cannot remember any changes that I have made to the system recently. Or maybe it has been a defective update of the glibc? I did not see in the bug

Re: [GENERAL] Using generate_series to create a unique ID in a query?

2007-11-13 Thread Decibel!
On Nov 12, 2007, at 5:11 PM, Sarah Dougherty wrote: For some context, I am trying to create a report that provides a list of client charges and payments and a running balance after each transaction. Because we often have multiple charges and/or payments on the same day, we can't use the

Re: [GENERAL] PITR and warm standby setup questions

2007-11-13 Thread Decibel!
On Nov 12, 2007, at 11:07 PM, Greg Smith wrote: On Mon, 12 Nov 2007, Mason Hale wrote: After the wal segment file is copied by the restore_command script, is it safe to delete it from my archive? While I believe you can toss them immediately, you should considering keeping those around

[GENERAL] Postgres table size

2007-11-13 Thread SHARMILA JOTHIRAJAH
Hi I have a table with 29384048 records in oracle and postgresql. The table has 47 columns (16 numeric and 27 varchar and the rest timestamp). The tablesize in postgresql is twice as much than the tablesize in oracle (for the same number of rows and columns). There are no updates or deletes

[GENERAL] Sharing database handles across forked child processes

2007-11-13 Thread dan
How does Postgres handle sharing database handles across child processes? That is, if I have a process that opens a connection to the database and then forks a few child processes, what happens? Can the child processes safely use the handle? If one child closes the handle, what happens to the

Re: [GENERAL] Sharing database handles across forked child processes

2007-11-13 Thread Martijn van Oosterhout
On Tue, Nov 13, 2007 at 12:02:31PM -0500, [EMAIL PROTECTED] wrote: How does Postgres handle sharing database handles across child processes? That is, if I have a process that opens a connection to the database and then forks a few child processes, what happens? Can the child processes safely

Re: [GENERAL] Sharing database handles across forked child processes

2007-11-13 Thread Tom Lane
Martijn van Oosterhout [EMAIL PROTECTED] writes: On Tue, Nov 13, 2007 at 12:02:31PM -0500, [EMAIL PROTECTED] wrote: How does Postgres handle sharing database handles across child processes? That is, if I have a process that opens a connection to the database and then forks a few child

Re: [GENERAL] Postgres table size

2007-11-13 Thread Reg Me Please
Il Tuesday 13 November 2007 17:36:30 SHARMILA JOTHIRAJAH ha scritto: Hi I have a table with 29384048 records in oracle and postgresql. The table has 47 columns (16 numeric and 27 varchar and the rest timestamp). The tablesize in postgresql is twice as much than the tablesize in oracle (for

Re: [GENERAL] Sharing database handles across forked child processes

2007-11-13 Thread dan
Martijn van Oosterhout [EMAIL PROTECTED] writes: On Tue, Nov 13, 2007 at 12:02:31PM -0500, [EMAIL PROTECTED] wrote: How does Postgres handle sharing database handles across child processes? That is, if I have a process that opens a connection to the database and then forks a few child

Re: [GENERAL] Postgres table size

2007-11-13 Thread Jeff Davis
On Tue, 2007-11-13 at 08:36 -0800, SHARMILA JOTHIRAJAH wrote: Hi I have a table with 29384048 records in oracle and postgresql. The table has 47 columns (16 numeric and 27 varchar and the rest timestamp). The tablesize in postgresql is twice as much than the tablesize in oracle (for the

Re: [GENERAL] Sharing database handles across forked child processes

2007-11-13 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Yep, this is a fork without exec. And the child processes often aren't even doing any database access -- the database connection's opened and held, then a child is forked off, and the child 'helpfully' closes the handle during the child's

Re: [GENERAL] Sharing database handles across forked child processes

2007-11-13 Thread Martijn van Oosterhout
On Tue, Nov 13, 2007 at 01:18:25PM -0500, [EMAIL PROTECTED] wrote: Yep, this is a fork without exec. And the child processes often aren't even doing any database access -- the database connection's opened and held, then a child is forked off, and the child 'helpfully' closes the handle during

Re: [GENERAL] Sharing database handles across forked child processes

2007-11-13 Thread Vivek Khera
On Nov 13, 2007, at 1:18 PM, [EMAIL PROTECTED] wrote: Yep, this is a fork without exec. And the child processes often aren't even doing any database access -- the database connection's opened and held, then a child is forked off, and the child 'helpfully' closes the handle during the child's

Re: [GENERAL] Sharing database handles across forked child processes

2007-11-13 Thread dan
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Yep, this is a fork without exec. And the child processes often aren't even doing any database access -- the database connection's opened and held, then a child is forked off, and the child 'helpfully' closes the handle during the child's

Re: [GENERAL] update record with two-column primary key

2007-11-13 Thread Charles Mortell
Beautiful, Scott. You nailed it. Thanks for the help! -Original Message- From: Scott Marlowe [mailto:[EMAIL PROTECTED] Sent: Monday, November 12, 2007 5:10 PM To: Charles Mortell Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] update record with two-column primary key OK, a

[GENERAL] Path to top of tree

2007-11-13 Thread Steve Crawford
Given a table which includes tree-type information consisting of an id and a parent_id, is there an already existing function that will return the path to the top of the tree for a given record? The connectby function from the contrib tablefuncs does what I want for a whole table, but I

[GENERAL] Impact of table scan on shared buffers

2007-11-13 Thread Morris Goldstein
Suppose I have a large table with no indexes, and I scan the entire thing. What is the impact on the shared buffers? I'm interested in three scenarios: - Scan done in SQL using SELECT, (via JDBC if it matters). - Scan done using SQL COPY. - Scan done using psql COPY. I suspect that the SELECT

Re: [GENERAL] Impact of table scan on shared buffers

2007-11-13 Thread Jeff Davis
On Tue, 2007-11-13 at 17:10 -0500, Morris Goldstein wrote: I suspect that the SELECT scan will tend to displace everything else in shared buffers, and I hope that the two forms of COPY do not. Is that correct? In 7.4 that may be true, but in later versions it's not. 8.0+ use multiple LRU

[GENERAL] Which JDBC Pool to use

2007-11-13 Thread Dhaval Shah
I was going through the docs for JDBC and came across connection pooling within driver. At the same time it mentions that one should use the Apache DBCP. So now the question is which connection pool to use and why? Regards Dhaval Shah ---(end of

[GENERAL] JOB WITH SUN MICROSYSTEMS!!!

2007-11-13 Thread Rick Grandy
We are looking for a Postgresql Architect/Developer to do some mentoring, training, knowledge transfer and implementation for a large media outlet in Los Angeles. Travel is fully funded and the rates are great! Please reply to [EMAIL PROTECTED] Thank you for your time!!! Regards, Ricky

Re: [GENERAL] JOB WITH SUN MICROSYSTEMS!!!

2007-11-13 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 13 Nov 2007 15:27:51 -0800 Rick Grandy [EMAIL PROTECTED] wrote: We are looking for a Postgresql Architect/Developer to do some mentoring, training, knowledge transfer and implementation for a large media outlet in Los Angeles. Travel is

Re: [GENERAL] Insert statements really slow

2007-11-13 Thread Merlin Moncure
On Nov 9, 2007 12:53 PM, Waller, David [EMAIL PROTECTED] wrote: I have an application that I am porting from MySQL to PostgreSQL and I am working on the import Perl script that process the data. The data is web log data and each line has a variable amount of the fields (mostly because of

Re: [HACKERS] [GENERAL] plperl and regexps with accented characters - incompatible?

2007-11-13 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Ugh, in testing I see some nastiness here without any explicit require. It looks like there's an implicit require if the text contains certain chars. Exactly. Looks like it's going to be very hard, unless someone has some brilliant

Re: [HACKERS] [GENERAL] plperl and regexps with accented characters - incompatible?

2007-11-13 Thread Andrew Dunstan
Greg Sabino Mullane wrote: Ugh, in testing I see some nastiness here without any explicit require. It looks like there's an implicit require if the text contains certain chars. Exactly. Looks like it's going to be very hard, unless someone has some brilliant insight I'm missing

Re: [GENERAL] Path to top of tree

2007-11-13 Thread Merlin Moncure
On Nov 13, 2007 3:35 PM, Steve Crawford [EMAIL PROTECTED] wrote: Given a table which includes tree-type information consisting of an id and a parent_id, is there an already existing function that will return the path to the top of the tree for a given record? The connectby function from the

[GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2007-11-13 Thread Martin Langhoff
Hi all - I've spotted the cast-related regressions being discussed here http://archives.postgresql.org/pgsql-general/2007-11/msg00505.php ... as a Moodle developer supporting Pg, the stricter cast rules in pg 8.3 are somewhat worrying. Is there a straightforward way to configure a given DB or a

[GENERAL] Bulk Load Ignore/Skip Feature

2007-11-13 Thread Willem Buitendyk
Will Postgresql ever implement an ignore on error feature when bulk loading data? Currently it is my understanding that any record that violates a unique constraint will cause the copy from command to halt execution instead of skipping over the violation and logging it - as is done in Oracle

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2007-11-13 Thread Tom Lane
Martin Langhoff [EMAIL PROTECTED] writes: I say they are worrying because Moodle code has many ocurrences of /* bla.id is an INT8 */ SELECT x,y,z FROM bla WHERE id='1'; And we also often quote INT values for inserts/updates, I am not sure if this is supported either. This is not a

Re: [HACKERS] [GENERAL] plperl and regexps with accented characters - incompatible?

2007-11-13 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: I tried something like that briefly and it failed. The trouble is, I think, that since the engine tries a require it fails on the op test before it even looks to see if the module is already loaded. I think we have little choice but to report this as

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2007-11-13 Thread Martin Langhoff
Tom Lane wrote: Martin Langhoff [EMAIL PROTECTED] writes: I say they are worrying because Moodle code has many ocurrences of /* bla.id is an INT8 */ SELECT x,y,z FROM bla WHERE id='1'; And we also often quote INT values for inserts/updates, I am not sure if this is supported either.

Re: [GENERAL] PITR and warm standby setup questions

2007-11-13 Thread Simon Riggs
On Tue, 2007-11-13 at 00:07 -0500, Greg Smith wrote: On Mon, 12 Nov 2007, Mason Hale wrote: After the wal segment file is copied by the restore_command script, is it safe to delete it from my archive? While I believe you can toss them immediately, This is almost never possible. The

Re: [GENERAL] Bulk Load Ignore/Skip Feature

2007-11-13 Thread Reg Me Please
Il Wednesday 14 November 2007 05:50:36 Willem Buitendyk ha scritto: Will Postgresql ever implement an ignore on error feature when bulk loading data? Currently it is my understanding that any record that violates a unique constraint will cause the copy from command to halt execution instead