[GENERAL] Anyone know of a Schema Comparer

2005-10-24 Thread Paul Newman
Hi, We will have anything upto 400 schema in our db. Each Schema is a replica of a “master” schema. Can anyone recommend a tool that we can compare our master schema to any given target schema which will then generate an update script which can subsequently be executed ? We have looked at

[GENERAL] Creating table in different database

2005-10-24 Thread Paresh Bafna
If there are multiple databases, say db1 and db2. And currently we are in db1, can we create table in db2 (without switching databases)? Is there any query to do this? - Paresh ---(end of broadcast)--- TIP 4: Have you searched our list archives?

Re: [GENERAL] a stored procedure ..with integer as the parameter

2005-10-24 Thread Tino Wildenhain
Am Dienstag, den 25.10.2005, 10:24 +0530 schrieb surabhi.ahuja: > oops i am sorry, > i mean from the client i ll be getting values (which i need to insert > into the table) in the form of strings: > > and i form the insert command as follows: > > function(char *a, char *b, char *c) > { > char

Re: [GENERAL] a stored procedure ..with integer as the parameter

2005-10-24 Thread surabhi.ahuja
Title: Re: [GENERAL] a stored procedure ..with integer as the parameter  oops i am sorry, i mean from the client i ll be getting values (which i need to insert into the table) in the form of strings:   and i form the insert command as follows:   function(char *a, char *b, char *c) { char

Re: [GENERAL] Map of Postgresql Users (OT)

2005-10-24 Thread Brent Wood
On Mon, 24 Oct 2005, Claire McLister wrote: > Hi, > > We've developed an automatic email mapping capability from Google Maps > API. > > To try it out, we mapped origins of emails to this group from October > 2, 2005 2 pm (EST) through October 14th, 9 am (EST). > > The result of this map is a

[GENERAL] Installation Problem

2005-10-24 Thread phil campaigne
Hi All, I'm trying ot install postgresql 8.0.4 on suse 9.0. I can run ./configure but when I try to run make, the program cannot find a usable c compiler. I tried ./configure CC=/usr/lib/gcc-lib/i586-suse-linux/3.3.3/cc1 but get the error: cannot run c compiled programs. I tried to downlaod an

Re: [GENERAL] newbie question: reading sql commands from script files

2005-10-24 Thread Sean Davis
Title: [GENERAL] newbie question: reading sql commands from script files In psql, look at \i.   Sean   - Original Message - From: basel novo To: pgsql-general@postgresql.org Sent: Monday, October 24, 2005 8:28 PM Subject: [GENERAL] newbie question: reading sq

[GENERAL] newbie question: reading sql commands from script files

2005-10-24 Thread basel novo
What is the equivalent of the mysql 'source' command for reading sql commands from ascii script files? Thanks. _ Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/

[GENERAL] pl/pgsql help

2005-10-24 Thread krishnaa sridharan
Hi all When I installed postgresql in my computer, I had pl/pgsql language selected but still, I dont have any language installed. Can some one tell me how to install a language. thanks in advance. i am a beginner so any help would be appreciated. Thanks

Re: [GENERAL] Deleting vs foreign keys

2005-10-24 Thread Michael Fuhr
On Tue, Oct 25, 2005 at 12:59:27AM +0300, WireSpot wrote: > I have an application that makes heavy use of foreign keys all over > the tables. This is very nice since the data is very consistent. There > also this "central" table which holds "sites" in it. A site pretty > much is the crux of it all.

Re: [GENERAL] Generic Q about max(id) vs ORDER BY ID DESC LIMIT 1

2005-10-24 Thread Michael Fuhr
On Mon, Oct 24, 2005 at 03:50:57PM -0700, [EMAIL PROTECTED] wrote: > I can't see any difference between these two statements: > > SELECT MAX(id) FROM table; > SELECT id FROM table ORDER BY id DESC LIMIT 1; > > If the planner / optimizer / whatever doesn't optimize them to the > same end r

Re: [GENERAL] Generic Q about max(id) vs ORDER BY ID DESC LIMIT 1 -- SOLVED

2005-10-24 Thread felix
On Mon, Oct 24, 2005 at 07:14:43PM -0400, Alex Turner wrote: > I believe based on semi-recent posts that MIN and MAX are now treated > as special cases in 8.1, and are synonymous with select id order by id > desc limit 1 etc.. Aha! I looked it up in the release notes, you are right. I had never

Re: [GENERAL] Generic Q about max(id) vs ORDER BY ID DESC LIMIT 1

2005-10-24 Thread Alex Turner
I believe based on semi-recent posts that MIN and MAX are now treated as special cases in 8.1, and are synonymous with select id order by id desc limit 1 etc.. Alex On 10/24/05, Douglas McNaught <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] writes: > > > However, in the process of investigating

[GENERAL] Autogenerated backup of a password protected database

2005-10-24 Thread Jamie Deppeler
Hi, Since pg_dump doesnt support password is there a way that password can be supplied -w option. Currently writting a application to do backups in java as i need a solution that is cross platform. Any help would be greatfully recieved. ---(end of broadcast)-

Re: [GENERAL] Generic Q about max(id) vs ORDER BY ID DESC LIMIT 1

2005-10-24 Thread Douglas McNaught
[EMAIL PROTECTED] writes: > However, in the process of investigating this, my boss found something > which we do not understand. A table with a primary key 'id' takes 200 > seconds to SELECT MAX(id), but is as close to instantaneous as you'd > want for SELECT ID ORDER BY ID DESC LIMIT 1. I under

Re: [GENERAL] Generic Q about max(id) vs ORDER BY ID DESC LIMIT 1

2005-10-24 Thread felix
Dang, that's a lot of answer! :-) and not what I was hoping for. Max and count both have to look up data records to skip values associated with other transactions. But count, by definition, has to scan every single record from one end of the index to the other, so the index is useless, whereas ma

Re: [GENERAL] Generic Q about max(id) vs ORDER BY ID DESC LIMIT 1

2005-10-24 Thread Scott Marlowe
On Mon, 2005-10-24 at 16:57, [EMAIL PROTECTED] wrote: > Having been surprised a few times myself by EXPLAIN showing a > sequential scan instead of using an index, and having seen so many > others surprised by it, I hope I am not asking a similar question. > > We recently upgraded our db servers, b

Re: [GENERAL] PostgreSQL vs mySQL, any performance difference for

2005-10-24 Thread Scott Marlowe
On Mon, 2005-10-24 at 17:19, Scott Marlowe wrote: > But PostgreSQL won't mangle your data to make it fit without even a > notice, like MySQL will. Note, in all fairness, MySQL 5.0.12 now does throw a warning when mangling my data. Why the client doesn't display it is beyond me. Why it's not an

Re: [GENERAL] PostgreSQL vs mySQL, any performance difference for

2005-10-24 Thread Scott Marlowe
On Mon, 2005-10-24 at 15:37, Jan wrote: > I need a database capable of storing at least 12 million records per > table, mostly used for batch queries. Basically an invoice database. > Some tables could potentially store 100 million records. > > mySQL5 contains many of the features or PostgreSQL, a

Re: [GENERAL] function DECODE and triggers

2005-10-24 Thread Rafael Montoya
I'm migrating from oracle to postgresl, and i have these 2 problems: 1. PostgreSQL doesn't support function DECODE from Oracle, but it can be replicated with CASE WHEN expr THEN expr [...] ELSE expr END , the problem appears when i want to convert this sentence from oracle to postgresl:

Re: [GENERAL] cannot stat `/usr/local/pgsql/data/pg_xlog/00000001000000430000009C': No such file or directory

2005-10-24 Thread Denis
Ok, I figured out how to get the archiver going again. This is what I have in the postgresql.conf file. archive_command = 'yblogger %p wrote in message news:[EMAIL PROTECTED] In my development system the file system where $PGDATA resides filled up. cp: writing `/usr/local/pgsql/archlog/ybcdr

Re: [GENERAL] PostgreSQL vs mySQL, any performance difference for

2005-10-24 Thread Jeff Davis
Jan wrote: I need a database capable of storing at least 12 million records per table, mostly used for batch queries. Basically an invoice database. Some tables could potentially store 100 million records. It does not sound like your performance requirements are very demanding. Either databas

[GENERAL] Generic Q about max(id) vs ORDER BY ID DESC LIMIT 1

2005-10-24 Thread felix
Having been surprised a few times myself by EXPLAIN showing a sequential scan instead of using an index, and having seen so many others surprised by it, I hope I am not asking a similar question. We recently upgraded our db servers, both old and new running 8.0, and one casualty was forgetting to

[GENERAL] Deleting vs foreign keys

2005-10-24 Thread WireSpot
I have an application that makes heavy use of foreign keys all over the tables. This is very nice since the data is very consistent. There also this "central" table which holds "sites" in it. A site pretty much is the crux of it all. Deleting a site will very precisely eliminate all data regarding

Re: [GENERAL] PostgreSQL vs mySQL, any performance difference for

2005-10-24 Thread Jeff Davis
Alex Turner wrote: I would ask you to ask the reverse question, why would you use MySQL when it still doesn't contain all the features of postgresql, has a bad query optimizer, a poor track record on scalability and will silenty truncate/accept invalid data, invalidating ACID, not only that you h

Re: [GENERAL] pg_dump, MVCC and consistency

2005-10-24 Thread Jeff Davis
Martijn van Oosterhout wrote: On Mon, Oct 24, 2005 at 11:25:00AM -0600, Michael Fuhr wrote: PostgreSQL 8.1 makes checks to avoid data loss due to transaction ID wraparound, but there's one situation I'm not sure how it handles: when a transaction is so long-lived that it would appear to be in t

Re: [GENERAL] PostgreSQL vs mySQL, any performance difference for large queries?

2005-10-24 Thread Alex Turner
I would ask you to ask the reverse question, why would you use MySQL when it still doesn't contain all the features of postgresql, has a bad query optimizer, a poor track record on scalability and will silenty truncate/accept invalid data, invalidating ACID, not only that you have to pay for it. W

Re: [GENERAL] a stored procedure ..with integer as the parameter

2005-10-24 Thread Alex Turner
On 24 Oct 2005 22:00:55 +0200, Harald Fuchs <[EMAIL PROTECTED]> wrote: In article <[EMAIL PROTECTED]>,Alex Turner <[EMAIL PROTECTED] > writes:> 1.  ( ) text/plain  (*) text/html> As sort of a side discussion - I have postulated that quoting all incomming> numbers as string would be an effec

Re: [GENERAL] is there a function which elminates spaces?

2005-10-24 Thread Martijn van Oosterhout
On Mon, Oct 24, 2005 at 03:50:33PM -0500, Jeffrey Melloy wrote: > >>In a WHERE clause, I want to to compare strings ignoring the spaces inside > >>them. Is therd a function to do that? I do not find it in the > >>documentation. > >> > >>SELECT ... WHERE (ignore_spaces(table.phone_number) ~* igore_s

[GENERAL] PostgreSQL vs mySQL, any performance difference for large queries?

2005-10-24 Thread Jan
I need a database capable of storing at least 12 million records per table, mostly used for batch queries. Basically an invoice database. Some tables could potentially store 100 million records. mySQL5 contains many of the features or PostgreSQL, and I doubt that I need all these features. Are the

Re: [GENERAL] Select all invalid e-mail addresses

2005-10-24 Thread Michael Fuhr
On Mon, Oct 24, 2005 at 09:02:26PM +0300, Andrus wrote: > I applied Michael hint about dollar quoting to this and tried > > create temp table customer ( email char(60)); > insert into customer values( '[EMAIL PROTECTED]'); > SELECT email FROM customer WHERE email !~* > $$ > [EMAIL PROTECTED]@

Re: [GENERAL] Why is this function wrong

2005-10-24 Thread [EMAIL PROTECTED]
Johan Wehtje wrote: > This is probably obvious but I am not seeing what is going wrong with > this function definition: > > CREATE OR REPLACE FUNCTION "public"."cproc_hli" (bgtemp NUMERIC, > humidity NUMERIC, wspeed NUMERIC) RETURNS NUMERIC AS > IF ($1 < 25) > THEN > SELECT (10.66 * (0.28 * $2)+(1.

Re: [GENERAL] Recovery after server crash

2005-10-24 Thread
In article <[EMAIL PROTECTED]>, Chris <[EMAIL PROTECTED]> wrote: >How can I get my data from this 7.4 data directory into my 8.0.3 fresh >install? Bring up a copy of 7.4 long enough to run pg_dumpall. Then load the dump into 8.0.3. -- http://www.spinics.net/yosemite/ -

Re: [GENERAL] Why is this function wrong

2005-10-24 Thread [EMAIL PROTECTED]
slight modification to the previous post, sorry, see http://www.postgresql.org/docs/8.0/interactive/plpgsql-structure.html for the real docs. CREATE OR REPLACE FUNCTION "public"."cproc_hli" (bgtemp NUMERIC, humidity NUMERIC, wspeed NUMERIC) RETURNS NUMERIC AS $$ BEGIN IF ($1 < 25) THEN SELEC

Re: [GENERAL] Collate problem

2005-10-24 Thread talenat
talenat wrote: talenat wrote: Hi, I have a mandrake 10.1 server running Postgres 8.1beta3 with hr_HR locale. Client is a XP with WIN1250 code page. When I use ORDER BY in query collation is out of order. I have tried with client encoding WIN1250 and LATIN2 but with no luck. If I use XP as a s

Re: [GENERAL] is there a function which elminates spaces?

2005-10-24 Thread Jeffrey Melloy
codeWarrior wrote: SELECT trim(trailing ' ' from city_name) AS city_name FROM sys_cities; You might consider reading the manual as there are a multitude of string manipulation functions built into postgreSQL You didn't answer his question. If you're going to rag on someone for not read

Re: [GENERAL] Why is this function wrong

2005-10-24 Thread Johan Wehtje
Thanks for your help, I adjusted the function after a better reading of the pl/Sql chapter - and feel I posted in haste. Hopefully though it may prove useful to someone else. Cheers Johan Wehtje Thomas F. O'Connell wrote: On Oct 24, 2005, at 11:27 AM, Johan Wehtje wrote: This is probably obv

Re: [GENERAL] Map of Postgresql Users (OT)

2005-10-24 Thread Claire McLister
I'm not sure if you show up in the wrong place, but you do show up in Mountain View, California. (To see that type 'hooger' next to the 'Name' filter above the map and click on 'Filter'. Claire On Oct 24, 2005, at 12:15 PM, Arthur Hoogervorst wrote: Hi, Pretty neat: I'm glad I'm not on t

Re: [GENERAL] Unsubscribe

2005-10-24 Thread Onyx
http://archives.postgresql.org/pgsql-general/ - Onyx --- Onyx Mueller Software Engineer i-cubed : information integration & imaging LLC 201 Linden Street : Third Floor Fort Collins, CO 80524 970-482-4400 voice 970-482-4499 fax www.i3.com > -Original Message- > From: [EMAIL PROTECTED]

Re: [GENERAL] a stored procedure ..with integer as the parameter

2005-10-24 Thread SCassidy
Hi, Well, as noted in another thread, many databases will not allow it (quoting an integer), so if you ever have to port it to another db, you will be out of luck. Also, the string you mentioned is also not an integer. When I tried your example with the embedded delete statement (e.g. select test

Re: [GENERAL] a stored procedure ..with integer as the parameter

2005-10-24 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Alex Turner <[EMAIL PROTECTED]> writes: > 1. ( ) text/plain (*) text/html > As sort of a side discussion - I have postulated that quoting all incomming > numbers as string would be an effective defense against SQL Injection style > attacks, as m

[GENERAL] Unsubscribe

2005-10-24 Thread Angshu Kar
Hi,   Could anyone let me know how to unsubscribe?   Thanks,Angshu  On 10/24/05, William Yu <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote:> VFP will run in WINE up to VFP version 8. But the people I talk to that > are doing this are using VFP's native tables. Does anyone know if it's> possible

Re: [GENERAL] FoxPro in WINE to Postgresql on LINUX?

2005-10-24 Thread William Yu
[EMAIL PROTECTED] wrote: VFP will run in WINE up to VFP version 8. But the people I talk to that are doing this are using VFP's native tables. Does anyone know if it's possible to run VFP8 in WINE and connect to Postgresql on a Linux server? I think part of the question here is how would WINE e

Re: [GENERAL] FoxPro in WINE to Postgresql on LINUX?

2005-10-24 Thread Andrus
http://www.paulmcnett.com/articles.php  has a white paper   White Paper: Running Visual FoxPro on Linux Using Wine (October 2003)   which describes using ODBC drivers from Linux.   Andrus.     <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...I know that there are some Visua

Re: [GENERAL] pg_dump with low priority?

2005-10-24 Thread Aaron Glenn
On 10/24/05, CSN <[EMAIL PROTECTED]> wrote: > > nice comes to mind: > > nice pg_dump ... > as mentioned earlier...nice isn't going to do anything for I/O. PITR (point in time recovery) would be, in my opinion, the best solution to this problem. aaron.glenn ---(end of broa

Re: [GENERAL] pg_dump with low priority?

2005-10-24 Thread CSN
nice comes to mind: nice pg_dump ... On Sat, 2005-10-22 at 07:39, Bryan Field-Elliot wrote: > We have a huge database which must be backed up every day with > pg_dump. The problem is, it takes around half an hour to produce the > dump file, and all other processes on the same box are starved f

Re: [GENERAL] Map of Postgresql Users (OT)

2005-10-24 Thread Arthur Hoogervorst
Hi, Pretty neat: I'm glad I'm not on that map! Regards, Arthur On 10/24/05, Claire McLister <[EMAIL PROTECTED]> wrote: > Hi, > > We've developed an automatic email mapping capability from Google Maps > API. > > To try it out, we mapped origins of emails to this group from October > 2, 20

Re: [GENERAL] pg_dump, MVCC and consistency

2005-10-24 Thread Alex Turner
Beleive me, when you get data feeds with bad data and you have to do each insert as an xact because copy will just dump out, you can hit 1bil really fast. AlexOn 10/24/05, Martijn van Oosterhout wrote: On Mon, Oct 24, 2005 at 11:25:00AM -0600, Michael Fuhr wrote:> PostgreSQL 8.

Re: [GENERAL] Prevent application log pollution with notice messages

2005-10-24 Thread Magnus Hagander
> Also: > > They cannot be filterad out since all Postgres log entries > have type Error, e.q. > LOG: database system is ready message is Erorr message ! > > Why postgres uses Error category for NOTICES ? Is'nt it > reasonable to use Information type ? This should be fixed in 8.0.4, and in

[GENERAL] Map of Postgresql Users (OT)

2005-10-24 Thread Claire McLister
Hi, We've developed an automatic email mapping capability from Google Maps API. To try it out, we mapped origins of emails to this group from October 2, 2005 2 pm (EST) through October 14th, 9 am (EST). The result of this map is at: http://www.zeesource.net/maps/map.do?group=456 Woul

Re: [GENERAL] a stored procedure ..with integer as the parameter

2005-10-24 Thread Alex Turner
As sort of a side discussion - I have postulated that quoting all incomming numbers as string would be an effective defense against SQL Injection style attacks, as magic quotes would destory any end-quote type syntax: in_value=1 select * from table where my_id='$in_value'; as an example for PHP

Re: [GENERAL] pg_dump, MVCC and consistency

2005-10-24 Thread Martijn van Oosterhout
On Mon, Oct 24, 2005 at 11:25:00AM -0600, Michael Fuhr wrote: > PostgreSQL 8.1 makes checks to avoid data loss due to transaction > ID wraparound, but there's one situation I'm not sure how it handles: > when a transaction is so long-lived that it would appear to be in > the future of newly-created

[GENERAL] FoxPro in WINE to Postgresql on LINUX?

2005-10-24 Thread MargaretGillon
I know that there are some Visual FoxPro developers on this list who use PostgreSQl as their back-end. My question to them is... VFP will run in WINE up to VFP version 8. But the people I talk to that are doing this are using VFP's native tables. Does anyone know if it's possible to run VFP8 in W

Re: [GENERAL] [ANNOUNCE] PostgreSQL 8.1 Beta 4

2005-10-24 Thread Magnus Hagander
> >> In order to address some issues found with the Windows > port, as well > >> as GCC4, we have released a Beta 4 of the upcoming > >> 8.1 Release. > > > > Are you specifically referring to the interrupt/signals test on > > windows here? Because that one isn't in beta4, it was > disabled agai

[GENERAL] Prevent application log pollution with notice messages

2005-10-24 Thread Andrus
My appl creates temporary table with primary key which exists only during transaction. Each creation of such table causes Postgres to write an entry to Windows application log file like: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "taitmata_pkey" for table "taitmata" I have lot

Re: [GENERAL] Select all invalid e-mail addresses

2005-10-24 Thread Andrus
> SELECT email FROM customer > WHERE email !~* > '[EMAIL PROTECTED]@(?:[EMAIL > PROTECTED])?[a-z0-9_-]+\.(?:a[defgilmnoqrstuwz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvxyz]|d[ejkmoz]|e[ceghrst]|f[ijkmorx]|g[abdefhilmnpqrstuwy]|h[kmnrtu]|i[delnoqrst]|j[mop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acd

Re: [GENERAL] [ANNOUNCE] PostgreSQL 8.1 Beta 4

2005-10-24 Thread Marc G. Fournier
On Mon, 24 Oct 2005, Magnus Hagander wrote: In order to address some issues found with the Windows port, as well as GCC4, we have released a Beta 4 of the upcoming 8.1 Release. Are you specifically referring to the interrupt/signals test on windows here? Because that one isn't in beta4, it was

Re: [GENERAL] log_min_duration_statement oddity

2005-10-24 Thread Bruce Momjian
Csaba Nagy wrote: > Thanks Tom, now at least I can stop chasing what I'm doing wrong :-) > > BTW, will be a way to also log the parameter values for prepared > statements ? While debugging performance problems it would be You mean the BIND values? No, not in 8.1, but it is on our TODO list now.

Re: [GENERAL] [ANNOUNCE] PostgreSQL 8.1 Beta 4

2005-10-24 Thread Magnus Hagander
> In order to address some issues found with the Windows port, > as well as GCC4, we have released a Beta 4 of the upcoming > 8.1 Release. Are you specifically referring to the interrupt/signals test on windows here? Because that one isn't in beta4, it was disabled again before it was packaged..

Re: [GENERAL] pg_dump, MVCC and consistency

2005-10-24 Thread Michael Fuhr
On Mon, Oct 24, 2005 at 02:29:24PM +0200, Florian Ledoux wrote: > If I have well understood, the defaut transaction isolation level in > PG is the "read commited" isolation level. If it is the isolation > scheme used by pg_dump how can I be sure that tables accessed at the > end of my export are co

Re: [GENERAL] Why is this function wrong

2005-10-24 Thread Thomas F. O'Connell
On Oct 24, 2005, at 11:27 AM, Johan Wehtje wrote: This is probably obvious but I am not seeing what is going wrong with this function definition: CREATE OR REPLACE FUNCTION "public"."cproc_hli" (bgtemp NUMERIC, humidity NUMERIC, wspeed NUMERIC) RETURNS NUMERIC AS IF ($1 < 25) THEN SELECT

Re: [GENERAL] Why is this function wrong

2005-10-24 Thread Csaba Nagy
The variant you're showing here has absolutely no quoting for the function body. You need to quote the body, and escape the quotes you have inside the body (in this example you don't have any). Wrap the body in BEGIN ... END. Also put semicolons after each statement end. Corrected code: CREATE O

Re: [GENERAL] [pgsql-general] Daily digest v1.5657 (16 messages)

2005-10-24 Thread Marc Munro
Florian, Reponses from, an ex-Oracle DBA, below. On Mon, 2005-10-24 at 11:51 -0300, [EMAIL PROTECTED] wrote: > Date: Mon, 24 Oct 2005 14:29:24 +0200 > From: Florian Ledoux <[EMAIL PROTECTED]> > To: pgsql-general@postgresql.org > Subject: pg_dump, MVCC and consistency > Message-ID: <[EMAIL PROTECTE

[GENERAL] Why is this function wrong

2005-10-24 Thread Johan Wehtje
This is probably obvious but I am not seeing what is going wrong with this function definition: CREATE OR REPLACE FUNCTION "public"."cproc_hli" (bgtemp NUMERIC, humidity NUMERIC, wspeed NUMERIC) RETURNS NUMERIC AS IF ($1 < 25) THEN SELECT (10.66 * (0.28 * $2)+(1.3 * $1) - $3) ELSE SELECT (8.62

Re: [GENERAL] is there a function which elminates spaces?

2005-10-24 Thread codeWarrior
SELECT trim(trailing ' ' from city_name) AS city_name FROM sys_cities; You might consider reading the manual as there are a multitude of string manipulation functions built into postgreSQL "Pierre Couderc" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In a WHERE clause, I

Re: [GENERAL] insertion becoming slow

2005-10-24 Thread Csaba Nagy
OK, it's quite some time from when the original question was posted, but now I have more data... see below. On Thu, 2005-09-29 at 19:24, Jim C. Nasby wrote: > On Tue, Sep 27, 2005 at 10:24:02AM +0200, Csaba Nagy wrote: > > Hi all, > > > > I've recently asked a similar question, which received no

[GENERAL] FW: cannot stat `/usr/local/pgsql/data/pg_xlog/00000001000000430000009C': No such file or directory

2005-10-24 Thread Sailer, Denis (YBUSA-CDR)
Here is the message.   2005-10-24 08:36:44 CDTLOG:  database system was shut down at 2005-10-24 08:35:25 CDT 2005-10-24 08:36:44 CDTLOG:  checkpoint record is at 43/B11C 2005-10-24 08:36:44 CDTLOG:  redo record is at 43/B11C; undo record is at 43/B11C; shutdown TRUE 2005-10

[GENERAL] FW: cannot stat `/usr/local/pgsql/data/pg_xlog/00000001000000430000009C': No such file or directory

2005-10-24 Thread Sailer, Denis (YBUSA-CDR)
I forgot to include the specific error message related to the archival process not finding the file.       From: Sailer, Denis (YBUSA-CDR) [mailto:[EMAIL PROTECTED] Sent: Monday, October 24, 2005 8:52 AM To: pgsql-general@postgresql.org Subject: cannot stat `/usr/local/pgsql/da

[GENERAL] PostgreSQL 8.1 Beta 4

2005-10-24 Thread Marc G. Fournier
In order to address some issues found with the Windows port, as well as GCC4, we have released a Beta 4 of the upcoming 8.1 Release. This Beta is meant to be a quick beta, baring any problems, with our first Release Candidate happening late this same week. With this beta, Tom has also put o

Re: [GENERAL] pg_dump with low priority?

2005-10-24 Thread Scott Marlowe
On Sat, 2005-10-22 at 07:39, Bryan Field-Elliot wrote: > We have a huge database which must be backed up every day with > pg_dump. The problem is, it takes around half an hour to produce the > dump file, and all other processes on the same box are starved for > cycles (presumably due to I/O) during

Re: [GENERAL] a stored procedure ..with integer as the parameter

2005-10-24 Thread Stephan Szabo
On Mon, 24 Oct 2005, surabhi.ahuja wrote: > from the client i receive a vector of strings ...which i have to pass as > arguments to the stored procedure. > > That stored procedure has valid arguments data types > > for instance > i have a stored procedure as follows: > > insert(integer, varchar(25

[GENERAL] cannot stat `/usr/local/pgsql/data/pg_xlog/00000001000000430000009C': No such file or directory

2005-10-24 Thread Sailer, Denis (YBUSA-CDR)
In my development system the file system where $PGDATA resides filled up.   cp: writing `/usr/local/pgsql/archlog/ybcdrdbd01/data/000100430076': No space left on device could not copy /usr/local/pgsql/data/pg_xlog/000100430076 to archive 2005-10-23 08:46:29 CDTLO

Re: [GENERAL] Outer join query plans and performance

2005-10-24 Thread Rich Doughty
Rich Doughty wrote: I'm having some significant performance problems with left join. Can anyone give me any pointers as to why the following 2 query plans are so different? [snip] knew i'd forgotten something... select version(); version -

[GENERAL] Outer join query plans and performance

2005-10-24 Thread Rich Doughty
I'm having some significant performance problems with left join. Can anyone give me any pointers as to why the following 2 query plans are so different? EXPLAIN SELECT * FROM tokens.ta_tokens t LEFT JOIN tokens.ta_tokenhist h1 ON t.token_id = h1.token_id LEFT JOIN tokens.ta_t

[GENERAL] pg_dump, MVCC and consistency

2005-10-24 Thread Florian Ledoux
Hello everybody ! I am coming from the (expensive) "Oracle World" and I am a newbie in PG administration. I am currently working on backup concerns... I am using pg_dump and I have not encountered any problems but I have some questions about the internal management of data consistency in PG server

Re: [GENERAL] Migration from 8.0 to 7.4...

2005-10-24 Thread Romain Vinot
Good point. This is exactly my problem. I tried to switch to the V2 protocol with the 8.0 JDBC driver. But in this case, I have the same behavior than with the 7.4 driver working on the 8.0 database. To answer Richard Huxton : the problem of JDBC 7.4 driver with a 8.0 database is that autoc

Re: [GENERAL] SHA1 authentication

2005-10-24 Thread Bohdan Linda
Thank you for the explanation. Cheers, Bohdan ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mai

Re: [GENERAL] Newbie Questions

2005-10-24 Thread Oliver Elphick
On Fri, 2005-10-21 at 19:46 -0400, Douglas McNaught wrote: > Redefined Horizons <[EMAIL PROTECTED]> writes: > > > I'm running the latest stable version of PostgreSQL on a Debian Linux box > > running Gnome 2.0. I've just started setting up my first database with > > PostgreSQL and I've got a few n

Re: [GENERAL] a stored procedure ..with integer as the parameter

2005-10-24 Thread Richard Huxton
surabhi.ahuja wrote: from the client I get : "200", "surabhi", "10" now i have to make a call to the stored procedure using the above received strings. will not the "200" be converted to a valid integer before saving into the database ..and same with the smallint values. That wasn't the error

Re: [GENERAL] Migration from 8.0 to 7.4...

2005-10-24 Thread Csaba Nagy
Romain, If you're using JDBC and the V3 protocol is hurting you (which was my case at one point), you can force the 8.0 driver to use the V2 protocol which does a lot of things differently. For a quick solution that could work until you fix your code to properly work with V3. Just shooting in the

Re: [GENERAL] SHA1 authentication

2005-10-24 Thread Martijn van Oosterhout
On Mon, Oct 24, 2005 at 10:39:11AM +0200, Bohdan Linda wrote: > > Hello all, > > I would like to use password authentication for pgsql users for remote > backup purposes. I don't like the fact storing cleartext password on a > system. From documentation, i have learnt that passwords can be encryp

[GENERAL] STL problem in stored procedures

2005-10-24 Thread Zoltán Dudás
Hi All, I have downloaded an extension for PostgreSql. It contains stored procedures written in C. I compiled the neccessary files into an so file and I tried to use the functions, but it gives an error message when it has to load the shared object file. The error message says, it cannot locate a

Re: [GENERAL] Migration from 8.0 to 7.4...

2005-10-24 Thread Richard Huxton
Romain Vinot wrote: Hi, We've got a problem with postgres 8.0 (our own code is not ready yet for the new driver) but a production database is already on postgres 8.0 (too bad, we didn't tested it enough...). What "new driver"? I wasn't aware of 8.0 not being able to work with drivers for 7.

Re: [GENERAL] a stored procedure ..with integer as the parameter

2005-10-24 Thread surabhi.ahuja
Title: Re: [GENERAL] a stored procedure ..with integer as the parameter from the client i receive a vector of strings ...which i have to pass as arguments to the stored procedure.   That stored procedure has valid arguments data types   for instance i have a stored procedure as follows:

Re: [GENERAL] Create GLOBAL TABLE

2005-10-24 Thread Marius Cornea
I found a solution to make a global table: Create a normal table, set the rellisshared to true (from pg_class), and move the file from current database folder to folder global. I don't know if cascase updates is running, if I link this table to multi databases. Thx, Marius -Original Messa

[GENERAL] SHA1 authentication

2005-10-24 Thread Bohdan Linda
Hello all, I would like to use password authentication for pgsql users for remote backup purposes. I don't like the fact storing cleartext password on a system. From documentation, i have learnt that passwords can be encrypted by md5 and crypt methods. But we know, that md5 is rather weak encryp

[GENERAL] Migration from 8.0 to 7.4...

2005-10-24 Thread Romain Vinot
Hi, We've got a problem with postgres 8.0 (our own code is not ready yet for the new driver) but a production database is already on postgres 8.0 (too bad, we didn't tested it enough...). So we need to migrate back to postgres 7.4 and wait for a code upgrade. Is there a possible way to do th