[GENERAL] can you tell me how to use rollback work in 'pgsql' function? and give me a exsample?

2005-07-13 Thread Nee.mem(倪明)
i see you wrote on this page http://archives.postgresql.org/pgsql-general/2005-07/msg00319.php test exsample: create or replace function test() returns void as ' begin delete from regiondata; rollback; end;

Re: [GENERAL] Windows version of PostgreSQL 8?

2005-07-13 Thread Frank Rittinger
Hello Bjørn, we are running a handfull of PostgreSQL installations on Windows Server 2000 and 2003 for web-mapping applications and they are running well for the last 8 months. Bjørn T Johansen wrote: How stable is the windows version of pgsql 8? Is it as stable as the Linux version or

Re: [GENERAL] Japanese words not distinguished

2005-07-13 Thread Harry Mantheakis
Correct. The lesson is, never use locale support for Asian languages and multibyte encodings including UTF-8. Thank you for your reply - much appreciated. I'm now concerned if and how this will affect ORDER BY query results (and other functions) with respect to Latin-1 names and words. I

[GENERAL] CreateTable -- schema not found

2005-07-13 Thread Josef Springer
Title: Signature Hi, sorry, i am a PostgesSQL beginner: I started the pgadmin tool as superuser. Created the database OfficeTalk Created the schema OfficeTalk with same permissions as the template pg_template_1 If i create the table OfficeTalk.absent schema

[GENERAL] Migrating a Microsoft-SQL database to Postgres

2005-07-13 Thread Josef Springer
Title: Signature Hi, i want to migrate a MS-SQL database to postgres. I have a SQL-script for the tables (definitions, indices a.s.o.), created by the MS-Enterprise-Manager. How can i create a postgres database with this script. Does a tool exist for reading such a script ? --

Re: [GENERAL] Windows version of PostgreSQL 8?

2005-07-13 Thread Bjørn T Johansen
It seems like the conclusion should be that PGSQL 8 works very well under Windows but maybe for Windows NT something else should be used; it seems like too much hazzle to get it to work BTJ Frank Rittinger wrote: Hello Bjørn, we are running a handfull of PostgreSQL installations on

[GENERAL] pgcrypto : how to get SHA1(string) as a 40-char string, NOT binary string?

2005-07-13 Thread Miles Keaton
I have the contrib/pgcrypto installed. I want to get the 40-character hash from SHA1 Example: SELECT digest('blue', 'sha1') would be: 4c9a82ce72ca2519f38d0af0abbb4cecb9fceca9 I was surprised and disappointed to get a binary-hash back. Does anyone know how to get the regular 40-character string

Re: [GENERAL] Migrating a Microsoft-SQL database to Postgres

2005-07-13 Thread Richard Huxton
Josef Springer wrote: Hi, i want to migrate a MS-SQL database to postgres. I have a SQL-script for the tables (definitions, indices a.s.o.), created by the MS-Enterprise-Manager. How can i create a postgres database with this script. Does a tool exist for reading such a script ? You

Re: [GENERAL] CreateTable -- schema not found

2005-07-13 Thread Ropel
Title: Signature I think it's because of uppercase letters: if you don't quote ... create table "OfficeTalk.absent" , postgresql will lowercase everything regards Josef Springer wrote: Hi, sorry, i am a PostgesSQL beginner: I started the pgadmin tool as superuser. Created

Fw: Re: [GENERAL] Windows version of PostgreSQL 8?

2005-07-13 Thread Nee.mem(倪明)
pgsql-general, 您好! postgreSQL version is Redhat 9.0 + postgresql 8.0.3 下面是转发邮件 原邮件发件人名字: Bj�rn_T_Johansen [EMAIL PROTECTED] 原邮件收件人名字:Frank Rittinger [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] It seems like the conclusion should be that PGSQL 8

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-13 Thread Dawid Kuroczko
On 7/13/05, Tom Lane [EMAIL PROTECTED] wrote: Greg Stark [EMAIL PROTECTED] writes: Personally I would settle for a fuller set of small fixed size datatypes. The char datatype is pretty much exactly what's needed except that it provides such a quirky interface. I'm not actually against

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-13 Thread Dawid Kuroczko
On 7/12/05, Joe [EMAIL PROTECTED] wrote: Dawid Kuroczko wrote: smallint takes two bytes. Numeric(1) will take around 10 bytes and char(1) will take 5 bytes (4 bytes for length of data). I never would've imagined *that* amount of overhead for CHAR(1)! I would've imagined that it would

Re: [GENERAL] CreateTable -- schema not found

2005-07-13 Thread Richard Huxton
Josef Springer wrote: Hi, sorry, i am a PostgesSQL beginner: * I started the pgadmin tool as superuser. * Created the database /OfficeTalk/ * Created the schema /OfficeTalk/ with same permissions as the template /pg_template_1/ Are you sure pg_template_1 isn't a

Re: [GENERAL] illegal sort order

2005-07-13 Thread Magnus Hagander
I insalled Postgres 8 in Windows XP with default settings I xreated database with encoding unicode. Unicode is not currently supported when the server runs on Win32, see http://www.postgresql.org/docs/faqs.FAQ_windows.html#2.6. You'll need to pick a different encoding if you need locale-aware

[GENERAL] NTFS partition autodetection during instalation

2005-07-13 Thread Evandro's mailing lists (Please, don't send personal messages to this address)
Dear hackers I want to embed postgres into a software installation. I will use silent install, how do I detect which partition is NTFS so I can tell the installer to use that partition? Many thanks -Evandro-- Evandro M Leite JrPhD Student Software developer University of Southampton,

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-13 Thread Martijn van Oosterhout
On Wed, Jul 13, 2005 at 10:48:56AM +0200, Dawid Kuroczko wrote: As for the char/varchar type -- I was wondering. Worst case scenario for UTF-8 (correct me on this) is when 1 character takes 4 bytes. And biggest problem with char/varchar is that length indicator takes 4 bytes... How much

Re: [GENERAL] NTFS partition autodetection during instalation

2005-07-13 Thread Magnus Hagander
I want to embed postgres into a software installation. I will use silent install, how do I detect which partition is NTFS so I can tell the installer to use that partition? You can't do that inside the installer, you'll have to do it in your own script/program that wraps it. //Magnus

Re: [GENERAL] illegal sort order

2005-07-13 Thread Andrus
Unicode is not currently supported when the server runs on Win32, see http://www.postgresql.org/docs/faqs.FAQ_windows.html#2.6. You'll need to pick a different encoding if you need locale-aware sorting. I need to upsize tables from other dbms. This dbms does not support unicode. I have tables

[GENERAL] 7.4.7: strange planner decision

2005-07-13 Thread Roman Neuhauser
Why does the planner want to crawl the table that has 5M rows instead of the one with 176k rows? Both tables are freshly vacuum-full-analyzed. 7.4.7 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4) callrec32=# explain select fd.base from fix.dups fd join

[GENERAL] strange error with temp table: pg_type_typname_nsp_index

2005-07-13 Thread Janning Vygen
Hi, [i am using Postgresql version 8.0.3] yesterday i posted a mail regarding a function which calculates a ranking with a plperl SHARED variable. Today i ve got some problems with it: FEHLER: duplizierter Schlüssel verletzt Unique-Constraint »pg_type_typname_nsp_index« CONTEXT:

[GENERAL] Array as parameter for plpgsql function

2005-07-13 Thread David Pratt
How does one pass an array as a parameter to a plpgsql function? I have tried this the following. I can't seem to get a select statement to work without syntax problems and no examples in Postgres book to help with this :( This is just a test so please ignore the fact it is a simple

Re: [GENERAL] 7.4.7: strange planner decision

2005-07-13 Thread Richard Huxton
Roman Neuhauser wrote: Why does the planner want to crawl the table that has 5M rows instead of the one with 176k rows? Both tables are freshly vacuum-full-analyzed. Because you don't have an index on base for the files table. callrec32=# \d fix.files Table fix.files Column |

[GENERAL] Strange memory behaviour with PGreset() ...

2005-07-13 Thread Einar Indridason
Hi folks. One of my co-workers came to me with a problem. I took a look, and it does seem to be a problem. (But where? That is why I'm turning to you...) The C code below serves as an example. He is basically trying to re-connect again to a bad database server. The server at 192.168.0.1,

Re: [GENERAL] can you tell me how to use rollback work in 'pgsql' function? and give me a exsample?

2005-07-13 Thread Alvaro Herrera
On Wed, Jul 13, 2005 at 01:55:39PM +0800, Nee.mem() wrote: i see you wrote on this page http://archives.postgresql.org/pgsql-general/2005-07/msg00319.php test exsample: create or replace function test() returns void as ' begin delete from

Re: [GENERAL] 7.4.7: strange planner decision

2005-07-13 Thread Roman Neuhauser
# dev@archonet.com / 2005-07-13 12:57:31 +0100: Roman Neuhauser wrote: Why does the planner want to crawl the table that has 5M rows instead of the one with 176k rows? Both tables are freshly vacuum-full-analyzed. Because you don't have an index on base for the files table. I added

Re: [GENERAL] pgcrypto : how to get SHA1(string) as a 40-char string, NOT binary string?

2005-07-13 Thread Michael Fuhr
On Wed, Jul 13, 2005 at 12:45:19AM -0700, Miles Keaton wrote: I have the contrib/pgcrypto installed. I want to get the 40-character hash from SHA1 Example: SELECT digest('blue', 'sha1') would be: 4c9a82ce72ca2519f38d0af0abbb4cecb9fceca9 I was surprised and disappointed to get a

Re: [GENERAL] index bloat

2005-07-13 Thread David Esposito
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 12:26 PM David Esposito [EMAIL PROTECTED] writes: As promised, here are two runs of VACUUM VERBOSE on the problem table ... BTW, the tail of the VACUUM VERBOSE output ought to have

[GENERAL] INSERT INTO from a SELECT query

2005-07-13 Thread Adam O'Toole
I am trying to INSERT multiple rows to a table using a stored procedure something like this: CREATE FUNCTION test(varchar) RETURNS int2 AS ' DECLARE id_list ALIAS FOR $1; BEGIN INSERT INTO history (media_id, media_type) SELECT media.media_id, media.media_type WHERE media.media_id IN

Re: [GENERAL] 7.4.7: strange planner decision

2005-07-13 Thread Richard Huxton
Roman Neuhauser wrote: Because you don't have an index on base for the files table. I added one, ran vacuum full analyze fix.files, and: callrec32=# \d fix.files Table fix.files Column | Type | Modifiers

Re: [GENERAL] getting the ranks out of items with SHARED

2005-07-13 Thread Janning Vygen
Hi, Am Mittwoch, 13. Juli 2005 00:03 schrieb Tom Lane: Janning Vygen [EMAIL PROTECTED] writes: I have a guess, what happens here: The order of the subselect statement is dropped by the optimizer because the optimizer doesn't see the side-effect of the ranking function. That guess is

[GENERAL] Schema accidentaly dropped in pg_namespace table

2005-07-13 Thread Benoît Toutain
Hi all, I've dropped a schema in my database with this command : delete from pg_namespace where nspname = toto; I know ... I 've done a big mistake :( . I will prefer drop schema toto the next time. Now I can't do a pg_dump because some objects of the removed schema are still referenced in

[GENERAL] To Postgres or not

2005-07-13 Thread Ted Slate
Hello Everyone, I considering moving a product to Solaris/Linux and trying to find a good DB. Oracle is out due to cost so as far as i know the only reasonable alternatives are Postgres or Codebase or MySQL. Does anyone here have any experience using Codebase or MySql? If I stick with a

Re: [GENERAL] Strange memory behaviour with PGreset() ...

2005-07-13 Thread Michael Fuhr
On Wed, Jul 13, 2005 at 12:09:37PM +, Einar Indridason wrote: Hi folks. One of my co-workers came to me with a problem. I took a look, and it does seem to be a problem. (But where? That is why I'm turning to you...) Your message doesn't say anything about what the problem is -- what

Re: [GENERAL] getting the ranks out of items with SHARED

2005-07-13 Thread Tom Lane
Janning Vygen [EMAIL PROTECTED] writes: this way it works: CREATE TEMP TABLE ranking AS *Q*; EXECUTE 'UPDATE temp_gc SET gc_rank = ranking.rank FROM ranking WHERE temp_gc.mg_name = ranking.mg_name;'; and this way it doesn't: UPDATE temp_gc SET gc_rank = ranking.rank FROM (*Q*) ranking

Re: [GENERAL] INSERT INTO from a SELECT query

2005-07-13 Thread Gnanavel S
Here the media_id will be checked with ('24,25') and not with (24,25). You might change the datatype from varchar to int array in test function and use any in the place of IN clause like this, CREATE FUNCTION test(int[]) RETURNS int2 AS ' DECLARE id_list ALIAS FOR $1; BEGIN INSERT INTO history

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-13 Thread Ron Mayer
Martijn van Oosterhout wrote: Well, you get another issue, alignment. If you squeeze your string down, the next field, if it is an int or string, will get padded to a multiple of 4 negating most of the gains. Like in C structures, there is padding to optimise access. Anecdotally I hear at

Re: [GENERAL] index bloat

2005-07-13 Thread David Esposito
First, thank you for spending so much time on this issue Second, I think I might have found a good lead ... I replicated the test you described below (minus the updating of 10% of the records) ... I've attached the PHP script (I'm more proficient at writing PHP than a shell script; you should be

Re: [GENERAL] To Postgres or not

2005-07-13 Thread Tino Wildenhain
Am Dienstag, den 12.07.2005, 17:16 + schrieb Ted Slate: Hello Everyone, I considering moving a product to Solaris/Linux and trying to find a good DB. Oracle is out due to cost so as far as i know the only reasonable alternatives are Postgres or Codebase or MySQL. Does anyone here

Re: [GENERAL] INSERT INTO from a SELECT query

2005-07-13 Thread Tino Wildenhain
Am Dienstag, den 12.07.2005, 12:47 -0300 schrieb Adam O'Toole: I am trying to INSERT multiple rows to a table using a stored procedure something like this: CREATE FUNCTION test(varchar) RETURNS int2 AS ' DECLARE id_list ALIAS FOR $1; BEGIN INSERT INTO history (media_id, media_type)

Re: [GENERAL] 7.4.7: strange planner decision

2005-07-13 Thread Roman Neuhauser
# dev@archonet.com / 2005-07-13 14:09:34 +0100: Roman Neuhauser wrote: callrec32=# \d fix.files Table fix.files Column | Type | Modifiers ++--- dir| character varying(255) | base |

Re: [GENERAL] strange error with temp table: pg_type_typname_nsp_index

2005-07-13 Thread Tom Lane
Janning Vygen [EMAIL PROTECTED] writes: I was just testing some configuration settings, especially increasing shared_buffers and setting fsync to false. And suddenly it happens 3 times out of ten that i get this error. Could you put together a complete example --- that is a script someone

Re: [GENERAL] Array as parameter for plpgsql function

2005-07-13 Thread Tom Lane
David Pratt [EMAIL PROTECTED] writes: CREATE FUNCTION create_record_test(text[][]) RETURNS int4 AS ' DECLARE test_array ALIAS FOR $1; -- alias for input array BEGIN return array_upper(test_array,1) END; ' LANGUAGE 'plpgsql'; SELECT

Re: [GENERAL] 7.4.7: strange planner decision

2005-07-13 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-13 15:58:09 +0200: # dev@archonet.com / 2005-07-13 14:09:34 +0100: Roman Neuhauser wrote: callrec32=# \d fix.files Table fix.files Column | Type | Modifiers ++---

Re: [GENERAL] 7.4.7: strange planner decision

2005-07-13 Thread Tom Lane
Richard Huxton dev@archonet.com writes: What happens to the plan if you SET enable_seqscan=false; first? It's presumably getting the row-estimate right, so unless there's terrible correlation on base in the files table I can only assume it's getting the cost estimates horribly wrong. I

Re: [GENERAL] Strange memory behaviour with PGreset() ...

2005-07-13 Thread Einar Indridason
On Wed, Jul 13, 2005 at 07:23:29AM -0600, Michael Fuhr wrote: On Wed, Jul 13, 2005 at 12:09:37PM +, Einar Indridason wrote: Hi folks. One of my co-workers came to me with a problem. I took a look, and it does seem to be a problem. (But where? That is why I'm turning to you...)

Re: [GENERAL] 7.4.7: strange planner decision

2005-07-13 Thread Richard Huxton
Roman Neuhauser wrote: # dev@archonet.com / 2005-07-13 14:09:34 +0100: Roman Neuhauser wrote: callrec32=# \d fix.files Table fix.files Column | Type | Modifiers ++--- dir| character varying(255) | base

[GENERAL] fts error

2005-07-13 Thread marcelo Cortez
hi folks the follow script fail select to_tsquery('hello world '); - ERROR: syntax error how to catch this error, any clue? best regards mdc __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! ¡Abrí tu

Re: [GENERAL] Array as parameter for plpgsql function

2005-07-13 Thread David Pratt
argh!!! It was telling me I had an error in select statement. Thanks Tom! Regards David On Wednesday, July 13, 2005, at 11:08 AM, Tom Lane wrote: David Pratt [EMAIL PROTECTED] writes: CREATE FUNCTION create_record_test(text[][]) RETURNS int4 AS ' DECLARE test_array ALIAS

Re: [GENERAL] Strange memory behaviour with PGreset() ...

2005-07-13 Thread Tom Lane
Einar Indridason [EMAIL PROTECTED] writes: I'm experiencing a memory leak, when I run this program. Yup, it's a leak. See patches just committed at http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-connect.c (note patch varies depending on branch)

Re: [GENERAL] Temp tables...

2005-07-13 Thread Greg Patnude
I am TOP POSTING intentionally -- Thanks Mike... Very informative -- I never realized that child (INHERITED) tables do NOT inherit the indexes from their parent... that might be part of the solution I duplicated the parents index on the child table -- the function still takes 4672 ms to

[GENERAL] chosing a database name

2005-07-13 Thread Karsten Hilbert
Hi all, we are developing GNUmed, a medical practice management application running on PostgreSQL (you want your medical data to be hosted by something reliable, don't you ;-) We are putting out our first release sometime in the next two weeks. The idea is to name the production database

[GENERAL] Client-Server Example

2005-07-13 Thread John Tulodziecki
Hi there I am trying to run a simple client application on one linux box (running redhat 9) whilst the server (i.e postmaster) is running on another box. I have successfully run the client program locally on the server machine. I am getting connection refused when I try a remote

Re: [GENERAL] INSERT INTO from a SELECT query

2005-07-13 Thread Adam O'Toole
I solved it. The statment worked as is, I just had to use dynamic SQL (put the statement in a string and the EXECUTE the string). Here is what I did: CREATE FUNCTION test(varchar) RETURNS int2 AS' DECLARE id_list ALIAS FOR $1; query varchar; BEGIN query := '' INSERT INTO history

Re: [GENERAL] To Postgres or not

2005-07-13 Thread Michael Schmidt
There are a number of good, objective, and informative comparisons available on the Internet, such as http://www.databasejournal.com/sqletc/article.php/3486596. You can Google something like "Postgresql mysql firebird comparison" to access these. I am migrating an application from Paradox

Re: [GENERAL] Client-Server Example

2005-07-13 Thread Bob
Have you checked your pg_hba.conf file and add the correct entry to allow the remote client ip address? Sorry don't have my file so I can't show you an example. But I think the docs and/or a google will show some examples. Also you have to alter the postgresql.conf to allow tcp/ip connections. I

[GENERAL] Slow delete

2005-07-13 Thread Doug Hall
Sorry. I realize this is a rather newbie question, but I've got a slow delete going on here, and I could use some help figuring out why. This is the classic get rid of orphans select. delete from citizen where id not in (select citizenid from citizen_stage); citizen.id and

Re: [GENERAL] chosing a database name

2005-07-13 Thread Alvaro Herrera
On Wed, Jul 13, 2005 at 05:56:03PM +0200, Karsten Hilbert wrote: we are developing GNUmed, a medical practice management application running on PostgreSQL (you want your medical data to be hosted by something reliable, don't you ;-) We are putting out our first release sometime in the next

[GENERAL] re my previous e-mail client-server example

2005-07-13 Thread John Tulodziecki
Bizzarly its now working after I added the server ip address in addition to the client ip address in the listen addresses config line !!! John Tulodziecki Senior Software Engineer Squire Technologies Ltd Phone +44(0)1305 757315 Web www.squire-technologies.com Email [EMAIL

[GENERAL] Nulls in timestamps

2005-07-13 Thread markMLl . pgsql-general
Where does PostgreSQL rank nulls when sorting a column of timestamps, is this behaviour deterministic, and can I rely on it not changing in the future? Apologies if this shows up as a repost, I've had gateway problems at this end. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk

Re: [GENERAL] [SQL] dynamically loaded functions

2005-07-13 Thread TJ O'Donnell
It sounds like you need to link gnova.so against the other shared objects so the runtime linker can find them. For examples, see the Makefiles used by contributed modules like dblink, xml2, and a few others that link against external libraries. That approach is working, but only after much

Re: [GENERAL] Nulls in timestamps

2005-07-13 Thread Tom Lane
[EMAIL PROTECTED] writes: Where does PostgreSQL rank nulls when sorting a column of timestamps, is this behaviour deterministic, and can I rely on it not changing in the future? Nulls sort high (in any datatype, not only timestamps). It's possible that we'd offer an option to make them sort

Re: [GENERAL] Slow delete

2005-07-13 Thread Tom Lane
Doug Hall [EMAIL PROTECTED] writes: delete from citizen where id not in (select citizenid from citizen_stage); The explain select tells me that there is a sequential select of citizen_stage records. (??) There are 75009 citizen records and 14778 records, and it's taking more than half an

Re: [GENERAL] index bloat

2005-07-13 Thread Tom Lane
David Esposito [EMAIL PROTECTED] writes: You're right that the index behavior is well-behaved with the cycle of INSERT / DELETE / VACUUM ... But while it was running, I started a second session to the database after the 60th iteration and did BEGIN; SELECT COUNT(*) FROM bigboy; ROLLBACK;

Re: [GENERAL] Nulls in timestamps

2005-07-13 Thread markMLl . pgsql-general
Many thanks Tom. Inconvenient from the point of view of the application but still useful information. The situation is that I've got a query with numerous subselects, each of which has to return exactly one row so I was doing a union with a nulled record then selecting the most recent: obviously

Re: [GENERAL] fts error

2005-07-13 Thread Oleg Bartunov
On Wed, 13 Jul 2005, marcelo Cortez wrote: hi folks the follow script fail select to_tsquery('hello world '); - ERROR: syntax error how to catch this error, any clue? by definition :) read http://www.sai.msu.su/~megera/oddmuse/index.cgi/tsearch-v2-intro Lets attempt to use the function

Re: [GENERAL] Nulls in timestamps

2005-07-13 Thread Scott Marlowe
On Wed, 2005-07-13 at 12:41, Tom Lane wrote: [EMAIL PROTECTED] writes: Where does PostgreSQL rank nulls when sorting a column of timestamps, is this behaviour deterministic, and can I rely on it not changing in the future? Nulls sort high (in any datatype, not only timestamps). It's

Re: [GENERAL] Nulls in timestamps

2005-07-13 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: On Wed, 2005-07-13 at 12:41, Tom Lane wrote: Nulls sort high (in any datatype, not only timestamps). It's possible that we'd offer an option to make them sort low in the future, but I can't imagine that we'd change the default behavior. Isn't this

Re: [GENERAL] Slow delete

2005-07-13 Thread Doug Hall
On Jul 13, 2005, at 12:46 PM, Tom Lane wrote: Doug Hall [EMAIL PROTECTED] writes: delete from citizen where id not in (select citizenid from citizen_stage); The explain select tells me that there is a sequential select of citizen_stage records. (??) There are 75009 citizen records and 14778

Re: [GENERAL] fts error

2005-07-13 Thread Joshua D. Drake
Oleg Bartunov wrote: On Wed, 13 Jul 2005, marcelo Cortez wrote: hi folks the follow script fail select to_tsquery('hello world '); - ERROR: syntax error how to catch this error, any clue? Also there is a handy article over here: http://www.devx.com/opensource/Article/21674/0 by

Re: [GENERAL] Slow delete

2005-07-13 Thread Tom Lane
Doug Hall [EMAIL PROTECTED] writes: If the EXPLAIN output doesn't say anything about a hashed subplan, then either you've got an old version or there's some sort of estimation problem. No, the EXPLAIN doesn't mention hashed subplan. I suspect it was a bug in the beta. You might need to

[GENERAL] stored proc help

2005-07-13 Thread Jason Tesser
I have the following store dproc but when I run it I am getting the error ERROR: invalid input syntax for integer: (1) CONTEXT: PL/pgSQL function irispermissionget line 9 at return next What am I doing wrong? CREATE OR REPLACE FUNCTION public.irispermissionget (username varchar,

Re: [GENERAL] To Postgres or not

2005-07-13 Thread Tadej Kanizar
I've been using MySql for a long time, and have just recently moved to PostgreSql (currently I have a few projects already running on postgresql).. I have to say I prefer PostgreSql over MySql. One major factor in this is the price (as mysql isn't free for commercial projects). I can't really tell

[GENERAL] Transparent encryption in PostgreSQL?

2005-07-13 Thread Matt McNeil
Greetings, I need to securely store lots of sensitive contact information andnotes in a freely availabledatabase (eg PostgreSQL or MySQL) that will bestored on a database server which I do not have direct access to. This database will be accessed by a PHP application that I amdeveloping.

Re: [GENERAL] index bloat

2005-07-13 Thread David Esposito
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 2:10 PM To: David Esposito Plain VACUUM doesn't try very hard to shorten the table physically, so that's not surprising either. But the internal free space should get picked up at this

Re: [GENERAL] index bloat

2005-07-13 Thread Tom Lane
David Esposito [EMAIL PROTECTED] writes: Hmm, if I keep running the following query while the test program is going (giving it a few iterations to rest between executions), the steady-state usage of the indexes seems to go up ... it doesn't happen every time you run the query, but if you do it

Re: [GENERAL] Transparent encryption in PostgreSQL?

2005-07-13 Thread Joshua D. Drake
My sense is that this is a difficult problem. However, I made the mistake of promising this functionality, Well it isn't that difficult except that you need some level of two way encryption and it is going to be a performance nightmare. I would suggest instead just mounting postgresql on

[GENERAL] What's Popular for CMS and RAD with PHP/PostgreSQL?

2005-07-13 Thread Google Mike
Using PHP and PostgreSQL only, what do you feel are the most popular CMS and RAD tools out there? I'm looking for free options. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

[GENERAL] Transparent encryption in PostgreSQL?

2005-07-13 Thread Matt McNeil
Greetings, I need to securely store lots of sensitive contact information andnotes in a freely availabledatabase (eg PostgreSQL or MySQL) that will bestored on a database server which I do not have direct access to. This database will be accessed by a PHP application that I amdeveloping.

Re: [GENERAL] chosing a database name

2005-07-13 Thread Karsten Hilbert
On Wed, Jul 13, 2005 at 12:53:15PM -0400, Alvaro Herrera wrote: we are developing GNUmed, a medical practice management application running on PostgreSQL (you want your medical data to be hosted by something reliable, don't you ;-) We are putting out our first release sometime in the

Re: [GENERAL] chosing a database name

2005-07-13 Thread Karsten Hilbert
On Wed, Jul 13, 2005 at 01:18:09PM -0400, Berend Tober wrote: Or why bother including either? Just use sequential integers, maybe left-padded with zeros to make the name the same length for the first thousand or so releases? A good tip, too, thanks. Would solve the ambiguity dilemma, too. I

Re: [GENERAL] chosing a database name

2005-07-13 Thread Vivek Khera
On Jul 13, 2005, at 1:18 PM, Berend Tober wrote: Or why bother including either? Just use sequential integers, maybe left-padded with zeros to make the name the same length for the first thousand or so releases? I concur with this advice. Just use a sequence number which happens to

Re: [GENERAL] To Postgres or not

2005-07-13 Thread Vivek Khera
On Jul 12, 2005, at 1:16 PM, Ted Slate wrote: If I stick with a true RDBMS then Codebase is out. So that leaves Postgres and MySQL. The first sentence rules out MySQL, so the second sentence should read So that leaves Postgres. Your problem is solved ;-) (If you are accustomed to

Re: [GENERAL] chosing a database name

2005-07-13 Thread Philip Hallstrom
we are developing GNUmed, a medical practice management application running on PostgreSQL (you want your medical data to be hosted by something reliable, don't you ;-) We are putting out our first release sometime in the next two weeks. The idea is to name the production database gnumed0.1 for

Re: [GENERAL] To Postgres or not

2005-07-13 Thread David Fetter
On Tue, Jul 12, 2005 at 05:16:44PM +, Ted Slate wrote: Hello Everyone, I considering moving a product to Solaris/Linux and trying to find a good DB. Oracle is out due to cost so as far as i know the only reasonable alternatives are Postgres or Codebase or MySQL. Does anyone here have

[GENERAL] Standalone Parser for PL/pgSQL

2005-07-13 Thread Matt Miller
I'd like (to find or make) a utility that inputs the code of a Pl/pgSQL function (e.g. from a text file or from STDIN, and then parses the function definition, building a complete symbol table. I would then write C code that walks that symbol table and does stuff. As a starting point I'd be

Re: [GENERAL] Transparent encryption in PostgreSQL?

2005-07-13 Thread Bob
Doesn't that really only save you from having someone come in at the OS level and copying your data files and than moutning them on a differet server/database. A person could still come in to psql as a dba or anyone for that matter with the proper select grants and query off that data and see it

Re: [GENERAL] chosing a database name

2005-07-13 Thread Karsten Hilbert
On Wed, Jul 13, 2005 at 01:21:01PM -0700, Philip Hallstrom wrote: My main concern, however, was whether the *approach* is sound, eg using a separate database name per release or IOW version. One way would be to use the database name gnumed regardless of release, another way would be to use

Re: [GENERAL] To Postgres or not

2005-07-13 Thread Bob
Even though PostgreSQL is more like an Oracle which is a good thing. It's like Oracle in function not in cost and adminstration. PostgreSQL not only fits into the enterprice really well it also fits in the mom and pop shops(dentist office,corner store, you name it that may not have any IT folks.

Re: [GENERAL] chosing a database name

2005-07-13 Thread Richard_D_Levine
[EMAIL PROTECTED] wrote on 07/13/2005 02:59:02 PM: On Wed, Jul 13, 2005 at 12:53:15PM -0400, Alvaro Herrera wrote: we are developing GNUmed, a medical practice management application running on PostgreSQL (you want your medical data to be hosted by something reliable, don't you ;-)

Re: [GENERAL] index bloat

2005-07-13 Thread David Esposito
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 3:45 PM Hmm, this is preferentially touching stuff near the right end of the index, ie, it's going to bloat the pages associated with higher keys. As I understand your usage of these

Re: [GENERAL] Standalone Parser for PL/pgSQL

2005-07-13 Thread Alvaro Herrera
On Wed, Jul 13, 2005 at 08:33:59PM +, Matt Miller wrote: I'd like (to find or make) a utility that inputs the code of a Pl/pgSQL function (e.g. from a text file or from STDIN, and then parses the function definition, building a complete symbol table. I would then write C code that walks

Re: [GENERAL] To Postgres or not

2005-07-13 Thread Jim C. Nasby
On Wed, Jul 13, 2005 at 04:24:53PM -0400, Vivek Khera wrote: On Jul 12, 2005, at 1:16 PM, Ted Slate wrote: If I stick with a true RDBMS then Codebase is out. So that leaves Postgres and MySQL. The first sentence rules out MySQL, so the second sentence should read So that leaves

Re: [GENERAL] index bloat

2005-07-13 Thread Tom Lane
David Esposito [EMAIL PROTECTED] writes: ... and the way new keys are inserted into the index is to always add them to a new page (where the 'new' page is either a truly new page, or a page that is completely empty), rather than using up some of the fragmented space within existing pages?

Re: [GENERAL] Transparent encryption in PostgreSQL?

2005-07-13 Thread snacktime
On 7/13/05, Matt McNeil [EMAIL PROTECTED] wrote: Greetings, I need to securely store lots of sensitive contact information and notes in a freely available database (eg PostgreSQL or MySQL) that will be stored on a database server which I do not have direct access to. This database will be

Re: [GENERAL] Transparent encryption in PostgreSQL?

2005-07-13 Thread Tom Lane
Bob [EMAIL PROTECTED] writes: Doesn't that really only save you from having someone come in at the OS level and copying your data files and than moutning them on a differet server/database. A person could still come in to psql as a dba or anyone for that matter with the proper select grants

Re: [GENERAL] index bloat

2005-07-13 Thread Alvaro Herrera
On Wed, Jul 13, 2005 at 05:39:33PM -0400, Tom Lane wrote: (Memo to hackers: this is a fairly interesting case for autovacuum I think. The overall update rate on the table is not high enough to trigger frequent vacuums, unless autovacuum is somehow made aware that particular index key ranges

Re: [GENERAL] Nulls in timestamps

2005-07-13 Thread Mark Morgan Lloyd
Scott Marlowe wrote: On Wed, 2005-07-13 at 12:41, Tom Lane wrote: [EMAIL PROTECTED] writes: Where does PostgreSQL rank nulls when sorting a column of timestamps, is this behaviour deterministic, and can I rely on it not changing in the future? Nulls sort high (in any datatype,

[GENERAL] Table Update Systems (was: chosing a database name)

2005-07-13 Thread Jeffrey Melloy
I think a better approach is to handle configuration management with a table in each schema. Update the schema, update the table. This works well with automating database upgrades as well, where upgrades are written as scripts, and applied in a given order to upgrade a database from release A

Re: [GENERAL] Standalone Parser for PL/pgSQL

2005-07-13 Thread Matt Miller
On Wed, 2005-07-13 at 17:04 -0400, Alvaro Herrera wrote: a simple standalone PL/pgSQL parser it relies on the main backend parser ... you'd have to mix both parsers somehow. ... The main parser depends (at least) on the List handling and memory handling Okay, you scared me off. It looks

Re: [GENERAL] Nulls in timestamps

2005-07-13 Thread Mark Morgan Lloyd
Tom Lane wrote: According to the SQL spec it's implementation defined, which means different DBs could do it differently but they have to tell you what they will do. Implementation dependent effectively means the behavior is not specified at all. One problem is that even if the server is

  1   2   >