Re: [GENERAL] RHEL

2003-11-12 Thread Tom Lane
Adam Haberlach [EMAIL PROTECTED] writes: I was, a few minutes ago, stunned to discover that as far as I can tell, the postgres server is not part of Red Hat Server ES Feel free to let Red Hat know that you're unhappy about this. (Not totally unbiased here ... I'm getting *very* tired

Re: [GENERAL] multibyte support

2003-11-12 Thread Ma Siva Kumar
On Tuesday 11 Nov 2003 9:02 pm, Dennis Gearon wrote: This is something I've been wondereing about for quite awhile - does pgsql measure bytes or chars when using UTF for varchars. It looks like bytes, which is counter intuitive. What are the byte codes for those 15 chars. I think the maximum

Re: [GENERAL] SQL-question: returning the id of an insert querry

2003-11-12 Thread Andrew Sullivan
On Mon, Nov 10, 2003 at 08:56:03AM -0800, Scott Chapman wrote: I talked with the author or SQLObject about this recently and I thnk he's implementing this correctly, by querying the cursor for the last OID?: That won't scale unless you index oid. And your tables will all need oids, which is

[GENERAL] Problem with FKEYS

2003-11-12 Thread Rajesh Kumar Mallah
How come pgsql7.3.4 Was allowing me to delete the master record while referencing records were present in slave table? The problem was detected when the database was migrated to 7.4 and deletions were being refused. Regards Mallah tradein_clients=# \d user_services Table

Re: [GENERAL] plperl/createlang issue

2003-11-12 Thread Christopher Murtagh
On Tue, 2003-11-11 at 21:22, Ed L. wrote: $ createlang plperl template1 ERROR: Load of file /opt/pgsql/installs/postgresql-7.3.4/lib/plperl.so failed: libperl.so: cannot open shared object file: No such file or directory createlang: language installation failed I had the exact problem

Re: [GENERAL] how can I change a btree index into a hash index?

2003-11-12 Thread Tom Lane
Mark Harrison [EMAIL PROTECTED] writes: Since these are all unique things, and will only be tested for equality, I am guessing that making a hash index will be better than making a btree index. You are mistaken. If there were any real value in that, we'd offer an easier way to do it.

Re: [GENERAL] SQL-question: returning the id of an insert querry

2003-11-12 Thread Greg Stark
scott.marlowe [EMAIL PROTECTED] writes: select tablename.fieldname.currval; That syntax would be problematic, it would mean to select all rows from tablename and evaluate fieldname.currval for each one. Actually it's worse, it would be confused with schemas I think. The postgres-ish way to do

Re: [GENERAL] procpid in pg_stat_activity but no correspoding backend

2003-11-12 Thread Rajesh Kumar Mallah
Jan Wieck wrote: Rajesh Kumar Mallah wrote: Hi , I noticed that an entry in pg_stat_activity was existing for a long duration 2 mins while its backend ( process corresponding to that procpid) was not running. how can it be possible ? version: 7.3.4 There was a bug that caused a crashing

Re: [GENERAL] SQL-question: returning the id of an insert querry

2003-11-12 Thread Doug McNaught
Scott Chapman [EMAIL PROTECTED] writes: On Wednesday 12 November 2003 11:29, Doug McNaught wrote: Scott Chapman [EMAIL PROTECTED] writes: It would be nice if PostgreSQL could return the primary key it inserted with but that may not be a fool-proof solution either. Is there a nice way

Re: [GENERAL] SQL-question: returning the id of an insert querry

2003-11-12 Thread Doug McNaught
Scott Chapman [EMAIL PROTECTED] writes: It would be nice if PostgreSQL could return the primary key it inserted with but that may not be a fool-proof solution either. Is there a nice way to handle this situation? Write a database function that inserts the record and returns the primary key

[GENERAL] plpgsql return setof integer?

2003-11-12 Thread Christopher Murtagh
Greetings, I've got a fairly simple function that I'm trying to return a set, but seem to have come across a stumbling block. When I execute the function below (the input params are not used at the moment) I get this: chris=# select htdig('foo', 'foo'); ERROR: set-valued function called in

Re: [GENERAL] Column Sizes

2003-11-12 Thread Adam Ruth
On Nov 12, 2003, at 11:04 AM, Brett Maton wrote: Hi NG, How do I find out the size of a column ? I am retrieving large objects from the pg_largeobject table and creating a files, I would like to know the length of the data column so that I can implement buffering instead of writing

Re: [GENERAL] multibyte support

2003-11-12 Thread Tom Lane
Ma Siva Kumar [EMAIL PROTECTED] writes: On Tuesday 11 Nov 2003 9:02 pm, Dennis Gearon wrote: This is something I've been wondereing about for quite awhile - does pgsql measure bytes or chars when using UTF for varchars. It looks like bytes, which is counter intuitive. The measurement is

Re: [GENERAL] simple question

2003-11-12 Thread Rick Gigger
Is this correct? vacuum by itself just cleans out the old extraneous tuples so that they aren't in the way anymore vacuum analyze rebuilds indexes. If you add an index to a table it won't be used until you vacuum analyze it vacuum full actually compresses the table on disk by reclaiming the

Re: [GENERAL] More Praise for 7.4RC2

2003-11-12 Thread Martijn van Oosterhout
Actually, in your case it's probably the new optimisation regarding the use of IN (subquery). They're now optimised to the same lavel as EXISTS IIRC. On Wed, Nov 12, 2003 at 05:46:23PM -0800, Reece Hart wrote: On Wed, 2003-11-12 at 09:04, jake johnson wrote: I also posted about the

[GENERAL] Perfomance difference between 7.2 and 7.3

2003-11-12 Thread Paulo Jan
Hi all: I have here a table with the following schema: Table todocinetv Column|Type | Modifiers -+-+-- id | integer | not null default '0'

[GENERAL] Column Sizes

2003-11-12 Thread Brett Maton
Hi NG, How do I find out the size of a column ? I am retrieving large objects from the pg_largeobject table and creating a files, I would like to know the length of the data column so that I can implement buffering instead of writing hundreds of small chunks to disk. Any help would be

Re: [GENERAL] Problem with FKEYS

2003-11-12 Thread Rajesh Kumar Mallah
Tom Lane wrote: Rajesh Kumar Mallah [EMAIL PROTECTED] writes: How come pgsql7.3.4 Was allowing me to delete the master record while referencing records were present in slave table? The only explanation I can think of is that the referencing row shown as being in

Re: [GENERAL] Perfomance difference between 7.2 and 7.3

2003-11-12 Thread Tom Lane
Paulo Jan [EMAIL PROTECTED] writes: - Seq Scan on todocinetv (cost=0.00..37768.90 rows=28792 width=8) The estimated cost seems to be more than one disk page read per row returned. This suggests to me that you have a huge amount of dead space in that table --- try a VACUUM FULL on

[GENERAL] serial type vs. sequences

2003-11-12 Thread Suchandra Thapa
I was wondering if there was a reliable method to get the last id inserted into a serial column in a table. I believe previous recommendations given were to use a sequence, have your app get the nextval for the sequence and then use that in the insert. I was wondering if things had changed or if

[GENERAL] Curious about exclusive table locks

2003-11-12 Thread Uwe C. Schroeder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. I have the following little stored proc: CREATE OR REPLACE FUNCTION public.ib_nextval(varchar) RETURNS varchar AS 'DECLARE countername ALIAS FOR $1; cprefix varchar; counter integer; dlen integer;

Re: [GENERAL] embedded postgresql

2003-11-12 Thread jini us
It is a shame that postgres is not available as an embedded server unlike mysql database server which comes in the form of a dll. However with mysql licence I would have to pay $10,000 if I wish to include it in mysql as an embedded server in my app. mysql database server is also a TCP/IP

Re: [GENERAL] procpid in pg_stat_activity but no correspoding backend

2003-11-12 Thread Jan Wieck
Rajesh Kumar Mallah wrote: Hi , I noticed that an entry in pg_stat_activity was existing for a long duration 2 mins while its backend ( process corresponding to that procpid) was not running. how can it be possible ? version: 7.3.4 There was a bug that caused a crashing backend to hang around

[GENERAL] embedded postgresql

2003-11-12 Thread jini us
Hi, I am starting a new project where I intend to use embedded database server in my win32 application. I intend to use VC++ microsoft studio 6.0 as my development environment. The postgres.org website seems to be catering for people with all sorts of requirements and platforms. 1. Where can I

Re: [GENERAL] Proposal for a cascaded master-slave replication system

2003-11-12 Thread Christopher Browne
In the last exciting episode, [EMAIL PROTECTED] (Jan Wieck) wrote: I look forward to your comments. It is not evident from the paper what approach is taken to dealing with the duplicate key conflicts. The example: UPDATE table SET col1 = 'temp' where col = 'A'; UPDATE table SET col1 = 'A'

Re: [GENERAL] embedded postgresql

2003-11-12 Thread Joshua D. Drake
jini us wrote: Hi, I am starting a new project where I intend to use embedded database server in my win32 application. I intend to use VC++ microsoft studio 6.0 as my development environment. The postgres.org website seems to be catering for people with all sorts of requirements and platforms.

Re: [GENERAL] pl/perl function life and variable scope - concurrency problem?

2003-11-12 Thread Doug McNaught
Christopher Murtagh [EMAIL PROTECTED] writes: Thanks to a lot of help on this list, I've managed to get my pl/perl function working. However, I have an unexpected result. Here's a simple way to reproduce this problem: CREATE or REPLACE FUNCTION perltest(integer) returns integer as '

Re: [GENERAL] plpgsql return setof integer?

2003-11-12 Thread Alvaro Herrera
On Wed, Nov 12, 2003 at 05:35:40PM -0500, Christopher Murtagh wrote: chris=# select htsearch('sample_return2.txt','dbname'); htsearch -- {HASH(0x835c298),2100,2113,2114} (1 row) Any obvious thing that I'm doing wrong? I'm using 7.4RC2. As

Re: [GENERAL] More Praise for 7.4RC2

2003-11-12 Thread Reece Hart
On Wed, 2003-11-12 at 09:04, jake johnson wrote: I also posted about the performance increase of 7.4, but I think that much of the difference you're seeing (because it's such a large difference) is probably due to the cleanliness of a newly restored database from backup. I agree that this

Re: [GENERAL] RHEL

2003-11-12 Thread Lamar Owen
On Tuesday 11 November 2003 11:57 pm, Tom Lane wrote: Adam Haberlach [EMAIL PROTECTED] writes: I was, a few minutes ago, stunned to discover that as far as I can tell, the postgres server is not part of Red Hat Server ES Feel free to let Red Hat know that you're unhappy about this.