Re: [GENERAL] Dump only functions...

2005-10-26 Thread Andreas Kretschmer
Cristian Prieto [EMAIL PROTECTED] schrieb: Any of you knows is there is any way in pg_dump or anything to dump just the functions from a database? Net really a solution, but your defined functions are stored in information_schema.routines HTH, Andreas -- Really, I'm not out to destroy

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

2005-10-26 Thread Tino Wildenhain
Am Mittwoch, den 26.10.2005, 09:37 +0530 schrieb surabhi.ahuja: what do u suggest i do then in that case? i mean how should i make a query - i mean how do i make a command? Need more details. What language are you using, what is the exact problem and so on. ---(end

Re: [GENERAL] Dump only functions...

2005-10-26 Thread Tino Wildenhain
Am Dienstag, den 18.10.2005, 15:31 -0600 schrieb Cristian Prieto: Any of you knows is there is any way in pg_dump or anything to dump just the functions from a database? pg_dump -Fc -v -f temp.dump yourdatabase pg_restore -l temp.dump | grep FUNCTION functionlist pg_restore -L functionlist

Re: [GENERAL] Autogenerated backup of a password protected database

2005-10-26 Thread Richard Huxton
Jamie Deppeler wrote: 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. You can use a .pgpass or pgpass.conf

Re: [GENERAL] Getting Stated

2005-10-26 Thread Richard Huxton
Bob Pawley wrote: I am very new. I am running Postgresql 8 on Windows. I have managed to create tables and have searched all the documentation available to get to the next step I need to take. Would anyone on the list be interested in giving me a few pointers on a one to one basis? It's

[GENERAL] Win32 libpq and ecpg thread safety

2005-10-26 Thread Qingqing Zhou
Hi, Is there a paragraph in the document talking about this? I've tried to look into it, but can't find it. Can anybody point me to it? Thanks, Qingqing ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire

Re: [GENERAL] alt+F not working after calling pg_dump

2005-10-26 Thread Andrus
Any idea how to make Alt key to work in my application immediately after calling pg_dump ? What parameters do you pass to CreateProcess()? I use modified Ed Rauh API_APP class. Relevant part of of the calling code: * This API call does the work. The parameters are as follows: *

Re: [GENERAL] function DECODE and triggers

2005-10-26 Thread Oliver Elphick
On Tue, 2005-10-25 at 18:31 +0200, Rafael Montoya wrote: Thanks for your answer, and if i have many options like decode (pre.C_EST,'01','U','02','M','03','W','04','D','05','O','06','S','') as Est do i have to write many else options in this way? select case when pre.C_EST = '01' THEN

Re: [GENERAL] function DECODE and triggers

2005-10-26 Thread Alban Hertroys
Rafael Montoya wrote: Thanks for your answer, and if i have many options like decode (pre.C_EST,'01','U','02','M','03','W','04','D','05','O','06','S','') as Est do i have to write many else options in this way? select case when pre.C_EST = '01' THEN 'U' ELSE when pre-C_EST = '02'

[GENERAL] How to get the value in the lastvalue field

2005-10-26 Thread Venki
Hi, Can anyone in the list tell me how to get the value in the lastvalue field of a sequence. I tried select currval('field_seq'); but got an error message ERROR: currval of sequence "field_seq" is not yet defined in this session. I think currval will work only after an insert. I don't want

Re: [GENERAL] How to get the value in the lastvalue field

2005-10-26 Thread Csaba Nagy
You can select it from the sequence's associated relation as from any table... try: select * from sequence_name; However, be aware that what you see there is the situation only in your transaction, and it is very possible that other transactions will use higher values concurrently. So it really

Re: [GENERAL] How to get the value in the lastvalue field

2005-10-26 Thread Sean Davis
On 10/26/05 8:23 AM, Venki [EMAIL PROTECTED] wrote: Hi, Can anyone in the list tell me how to get the value in the lastvalue field of a sequence. I tried select currval('field_seq'); but got an error message ERROR: currval of sequence field_seq is not yet defined in this session.

Re: [GENERAL] How to get the value in the lastvalue field

2005-10-26 Thread Venki
Hi thanks for the replies. The situation is as follows. We get backups from the production server and update the local database in the localserver but each time when we restore the database backup the sequence values are not getting updated properly. So what i thought was to write a

Re: [GENERAL] How to get the value in the lastvalue field

2005-10-26 Thread Csaba Nagy
If I was you, I would assign separate non-overlapping sequence ranges for all servers from start. The ranges should be sized considering what traffic each server will have. When one of the servers is close to use up it's sequence range, assign it another one... Then you will always know that one

Re: [GENERAL] How to get the value in the lastvalue field

2005-10-26 Thread Sean Davis
On 10/26/05 8:42 AM, Venki [EMAIL PROTECTED] wrote: Hi thanks for the replies. The situation is as follows. We get backups from the production server and update the local database in the local server but each time when we restore the database backup the sequence values are not getting

Re: [GENERAL] Win32 libpq and ecpg thread safety

2005-10-26 Thread Bruce Momjian
Qingqing Zhou wrote: Hi, Is there a paragraph in the document talking about this? I've tried to look into it, but can't find it. Can anybody point me to it? Well, libpq has a section: http://candle.pha.pa.us/main/writings/pgsql/sgml/libpq-threading.html I don't see a thread

Re: [GENERAL] the best way to catch table modification

2005-10-26 Thread Janning Vygen
Am Dienstag, 25. Oktober 2005 19:40 schrieb David Gagnon: Hi, I posted on the same subject a month ago . .you can search for the current title in the JDBC mailing list [JDBC] implementing asynchronous notifications PLEASE CONFIRM MY I ended using statement-level trigger. I haven't found

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

2005-10-26 Thread Brent Wood
On Tue, 25 Oct 2005, Claire McLister wrote: Thanks. I looked at the Mapserver maps, and at first glance it seems Google Maps API provides better map images and more interactive features (zooming, panning, JS popups, satellite/map views, etc.) So, what would be the advantage of Mapserver

Re: [GENERAL] Quickly calculating row size of a table?

2005-10-26 Thread Jared Evans
Thanks very much for both your posts. I tried both: First, I performed a full vacuum on the entire database then dbn=# SELECT relname, relpages*8192/reltuples from pg_class where reltuples 0 and relname not like 'pg%'; atablename| 2047.95 The first SQL statement gave me a

Re: [GENERAL] [ODBC] versions of oDBC driver

2005-10-26 Thread Zlatko Matić
Hello. After I tried different things, I finally figured out where is the problem with connection string: Driver={PostgreSQL} must be changed to Driver={PostgreSQL Unicode}. Now it works. But this new connection string works only with Postgres 8.1, while it doesn't work with Postgres 8.0... I

[GENERAL] querying PostgreSQL version?

2005-10-26 Thread Zlatko Matić
Hello. Is there any way to check the version of PostgreSQL by a query? Maybe by querying catalog tables? Thanks, Zlatko

[GENERAL] Need help with INOUT mis-understanding

2005-10-26 Thread Troy
Yes, I'm a Newbie but I really like it so far except a few misunderstandings I have, like INOUT. (I am using 8.1 beta 3 on both WIN and FC w/ pgadmin III.) I cannot use multiple in/out/inouts within functions to return results. How can I use INOUTS the right way? Here I thought I'd get an updated

Re: [GENERAL] How to use LIKE and $1 in a function ?

2005-10-26 Thread Troy
I am learning PostgreSQL with an O'Reilly book and I have a problem with functions : I created a very basic function to look for a name in a table : If your reading that book then you're not going to be using INOUT - which is what I'm learning. But here is how you could do it with inout in

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

2005-10-26 Thread Brent Wood
On Tue, 25 Oct 2005, basel novo wrote: What is the equivalent of the mysql 'source' command for reading sql commands from ascii script files? I have not used mysql, so am not familiar with the source command, but to have postgres run a set of sql statements/queries from a file you can:

[GENERAL] Looking for a command to list schemas

2005-10-26 Thread Cosmopo
Hello, We are presently experimenting with Postgresql schemas... We used basic commands like \d to list info from all tables/sequence/owner in a db... The schema info was always public since we never created one... In version 7.3.4 and with a test db where schemas were created, the same \d does

Re: [GENERAL] querying PostgreSQL version?

2005-10-26 Thread Rodrigo Gonzalez
select version() Zlatko Matić wrote: Hello.   Is there any way to check the version of PostgreSQL by a query? Maybe by querying catalog tables? Thanks,   Zlatko

Re: [GENERAL] Dump only functions...

2005-10-26 Thread Troy
I'm not sure of your intentions but just as a suggestion, download PGADMIN III. You can select a SCHEMA and do a BACKUP with many options for your custom editing. (I'm new and that's the fastest way if you have hundreds of functions procedures like me) you can tweek the generated backup file and

Re: [GENERAL] How Do I install the Admin Module (pgAdmin III)

2005-10-26 Thread Troy
I did 8.1 beta3 for windows and PGAdmin III was nicely included. Then when I downloaded Postgresql 8.1 on Fedora Core it wasn't there so I downloaded it seperatly and it works pretty much the same. ( I downloaded the second to lated version because of installer errors on my system.) Hope is

Re: [GENERAL] querying PostgreSQL version?

2005-10-26 Thread Peter Wiersig
On Wed, Oct 26, 2005 at 02:52:36PM +0200, Zlatko Matić wrote: Is there any way to check the version of PostgreSQL by a query? Maybe by querying catalog tables? Easier: select version(); Peter ---(end of broadcast)--- TIP 2: Don't 'kill -9' the

Re: [GENERAL] querying PostgreSQL version?

2005-10-26 Thread Sean Davis
On 10/26/05 8:52 AM, Zlatko Matić [EMAIL PROTECTED] wrote: Hello. Is there any way to check the version of PostgreSQL by a query? Maybe by querying catalog tables? Select version(); ---(end of broadcast)--- TIP 6: explain analyze is your

Re: [GENERAL] querying PostgreSQL version?

2005-10-26 Thread A. Kretschmer
am 26.10.2005, um 14:52:36 +0200 mailte Zlatko Mati? folgendes: Hello. Is there any way to check the version of PostgreSQL by a query? Maybe by querying catalog tables? Thanks, select version(); HTH, Andreas -- Andreas Kretschmer(Kontakt: siehe Header) Heynitz: 035242/47212,

Re: [GENERAL] Looking for a command to list schemas

2005-10-26 Thread Andreas Kretschmer
Cosmopo [EMAIL PROTECTED] schrieb: It seems that once we created the schema and created a table with this schema, if we forget about it, the is no way to list the schema or to have the tables/sequence with it's associated schema... Can someone tell us how we can get this important info? \dn

Re: [GENERAL] querying PostgreSQL version?

2005-10-26 Thread Terry Lee Tucker
rnd=# select version(); version -- PostgreSQL 7.4.6 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.2.3 20030502 (Red Hat Linux

Re: [GENERAL] Looking for a command to list schemas

2005-10-26 Thread Martijn van Oosterhout
On Tue, Oct 25, 2005 at 11:25:22AM -0700, Cosmopo wrote: Hello, We are presently experimenting with Postgresql schemas... We used basic commands like \d to list info from all tables/sequence/owner in a db... The schema info was always public since we never created one... \dn list schemas

Re: [GENERAL] querying PostgreSQL version?

2005-10-26 Thread A. Kretschmer
am 26.10.2005, um 10:22:27 -0300 mailte Rodrigo Gonzalez folgendes: !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head meta content=text/html;charset=ISO-8859-2 http-equiv=Content-Type /head body bgcolor=#ff text=#00 select version()br br Zlatko Mati? wrote:

Re: [GENERAL] Dump only functions...

2005-10-26 Thread Bricklen Anderson
Tino Wildenhain wrote: Am Dienstag, den 18.10.2005, 15:31 -0600 schrieb Cristian Prieto: Any of you knows is there is any way in pg_dump or anything to dump just the functions from a database? pg_dump -Fc -v -f temp.dump yourdatabase pg_restore -l temp.dump | grep FUNCTION functionlist

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

2005-10-26 Thread Claire McLister
Hi Joshua, No, you should not need a plugin. Can you open the Firefox Javascript console and see if you get errors in Javascript? The mapping relies heavily on Javascript and sometimes that gives errors. I just tried it on Firefox 1.0 and it showed up okay. Let me know if the problem

[GENERAL] Where is the webaddress for the most recent postgresql version?

2005-10-26 Thread Emi Lu
Good morning, May I know the link/web address where I can get the most recent postgresql version information please? I'd love also to get the online manual address about updating old version to the new one and the patches. Thanks a lot, Emi ---(end of

Re: [GENERAL] Where is the webaddress for the most recent postgresql

2005-10-26 Thread Devrim GUNDUZ
Hi, On Wed, 26 Oct 2005, Emi Lu wrote: May I know the link/web address where I can get the most recent postgresql version information please? http://www.PostgreSQL.org/ftp I'd love also to get the online manual address about updating old version to the new one and the patches.

Re: [GENERAL] Need help with INOUT mis-understanding

2005-10-26 Thread Tom Lane
Troy [EMAIL PROTECTED] writes: Does PL/PGSQL handle INOUTS the same as ORACLE PL/SQL? Probably not, if the way you seem to expect it to work is like Oracle. An INOUT parameter isn't some sort of modifiable by-reference variable, it's just a shorthand for declaring an IN parameter and an OUT

Re: [GENERAL] Quickly calculating row size of a table?

2005-10-26 Thread Tom Lane
Jared Evans [EMAIL PROTECTED] writes: dbn=# SELECT relname, relpages*8192/reltuples from pg_class where reltuples 0 and relname not like 'pg%'; That calculation lumps free space (and page header overhead and so on) into the size of the tuples. regards, tom lane

Re: [GENERAL] Need help with INOUT mis-understanding

2005-10-26 Thread Tony Caduto
Tom Lane wrote: Troy [EMAIL PROTECTED] writes: Does PL/PGSQL handle INOUTS the same as ORACLE PL/SQL? Probably not, if the way you seem to expect it to work is like Oracle. An INOUT parameter isn't some sort of modifiable by-reference variable, it's just a shorthand for declaring an

Re: [GENERAL] Need help with INOUT mis-understanding

2005-10-26 Thread Tom Lane
Tony Caduto [EMAIL PROTECTED] writes: I have noticed this as well, if I declare OUT params I can modify them to my hearts content before they go out, however if you declare it as a INOUT you can't modify it because it is declared as a constant. Uh, I don't think so. /*

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

2005-10-26 Thread Andrus
Can you use Postgres savepoints from VFP ? sqlexec('ROLLBACK TO mysavepoint') and even sqlexec('ROLLBACK') cause C5 error. Andrus. William Yu [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Here's what I do. Once I get a good config, I just tarball my .wine dir and untarball

[GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Andrus
Yesterday computer running Postgres re-boots suddenly. After that, select * from firma1.klient returns ERROR: invalid page header in block 739 of relation klient I have Quantum Fireball IDE drive, write caching is turned OFF. I have Windows XP with FAT32 file system. I'm using PostgreSQL

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Andrus
To change partition types you need to re-format (resetting partitions will lose data structure - reformat required). Troy, Whole my IDE drive is 20 GB FAT32 C: drive booting XP I have a lot of data in this drive so it is not possible to re-format. Also I do'nt want to create two logical disks

Re: [GENERAL] escape string type for upcoming 8.1

2005-10-26 Thread Ken Johanson
Bruce Momjian wrote: E'' is more a marker than a type. I realize making E a type might work, but it seems unusual. What we could do is backpatch E'' to 8.0.X as a no-op like it will be in 8.1. Bruce, Is it possible in the 8.1 betas to 'switch on' on the standard SQL escape behavior? This

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Scott Marlowe
On Wed, 2005-10-26 at 10:27, Andrus wrote: Yesterday computer running Postgres re-boots suddenly. After that, select * from firma1.klient returns ERROR: invalid page header in block 739 of relation klient I have Quantum Fireball IDE drive, write caching is turned OFF. I have

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Gregory Youngblood
Talking with various people that ran postgres at different times, one thing they always come back with in why mysql is so much better: postgresql corrupts too easily and you lose your data. Personally, I've not seen corruption in postgres since 5.x or 6.x versions from several years ago. And,

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Joshua D. Drake
On Wed, 2005-10-26 at 18:27 +0300, Andrus wrote: Yesterday computer running Postgres re-boots suddenly. After that, select * from firma1.klient returns ERROR: invalid page header in block 739 of relation klient I have Quantum Fireball IDE drive, write caching is turned OFF. I have

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Welty, Richard
Gregory Youngblood wrote: Is corruption a problem? I don't think so - but I want to make sure I haven't had my head in the sand for a while. :) I realize this instance appears to be on Windows, which is relatively new as a native Windows program. I'm really after the answer on more mature

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Tom Lane
Gregory Youngblood [EMAIL PROTECTED] writes: Is corruption a problem? I don't think so - but I want to make sure I haven't had my head in the sand for a while. :) I realize this instance appears to be on Windows, which is relatively new as a native Windows program. I'm really after the answer

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Joshua D. Drake
On Wed, 2005-10-26 at 19:14 +0300, Andrus wrote: To change partition types you need to re-format (resetting partitions will lose data structure - reformat required). Troy, Whole my IDE drive is 20 GB FAT32 C: drive booting XP I have a lot of data in this drive so it is not possible to

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

2005-10-26 Thread Bruno Wolff III
On Mon, Oct 24, 2005 at 16:21:57 -0700, [EMAIL PROTECTED] wrote: 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..

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Joshua D. Drake
AFAICS mysql will have exactly the same problems. So will oracle or any other DB. Oracle may have a better looking track record, but that's probably because people don't try to run it on cheap junk PCs. Can I quote this? regards, tom lane

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Wes Williams
Type the following at the Windows command prompt (start, run, cmd): convert c: /fs:ntfs /v It will complain about locked files and perform the convert at the next reboot, which you should do immediately. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of

Re: [GENERAL] improve 'where not exists' query..

2005-10-26 Thread Bruno Wolff III
On Tue, Oct 25, 2005 at 15:46:52 -0500, Noel Whelan [EMAIL PROTECTED] wrote: I'm wondering if there's an ideal way to improve the efficiency of this query: SELECT i.id http://i.id FROM items i WHERE (NOT (EXISTS (SELECT c.id http://c.id FROM contacts c WHERE (c.id http://c.id = i.id

Re: [GENERAL] improve 'where not exists' query..

2005-10-26 Thread Noel Whelan
I've done an explain analyze - nothing looks wrong to me. I'm thinking it's not exactly an issue with the query itself; it's just an inefficient thing I want to do (essentially, for each id in the one table, identify whether or not one exists in the other table). Current installation is 7.3.4;

Re: [GENERAL] querying PostgreSQL version?

2005-10-26 Thread Larry Rosenman
On Oct 26, 2005, at 7:52 AM, Zlatko Matić wrote: Hello. Is there any way to check the version of PostgreSQL by a query? Maybe by querying catalog tables? Thanks, select version(); Zlatko -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-351-4152

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Shelby Cain
Additionally, you should also take the opportunity to defrag the filesystem after the conversion as the change in cluster size (I'm guessing from 64k to 4k) will leave your shiny new NTFS file system highly fragmented. --- Wes Williams [EMAIL PROTECTED] wrote: Type the following at the Windows

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Scott Marlowe
On Wed, 2005-10-26 at 11:14, Gregory Youngblood wrote: Talking with various people that ran postgres at different times, one thing they always come back with in why mysql is so much better: postgresql corrupts too easily and you lose your data. Personally, I've not seen corruption in

Re: [GENERAL] How to get the value in the lastvalue field

2005-10-26 Thread Bruno Wolff III
On Wed, Oct 26, 2005 at 18:12:32 +0530, Venki [EMAIL PROTECTED] wrote: Hi thanks for the replies. The situation is as follows. We get backups from the production server and update the local database in the local server but each time when we restore the database backup the sequence values

Re: [GENERAL] Where is the webaddress for the most recent postgresql version?

2005-10-26 Thread Bruno Wolff III
On Wed, Oct 26, 2005 at 10:33:21 -0400, Emi Lu [EMAIL PROTECTED] wrote: Good morning, May I know the link/web address where I can get the most recent postgresql version information please? I'd love also to get the online manual address about updating old version to the new one and the

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Wes Williams
Even with a primary UPS on the *entire PostgreSQL server* does one still need, or even still recommend, a battery-backed cache on the RAID controller card? [ref SCSI 320, of course] If so, I'd be interest in knowing briefly why. Thanks. -Original Message- ===snip=== ... every server

[GENERAL] Postgresql 8

2005-10-26 Thread Bob Pawley
I am running version 8 on Windows. Why do I get error messages stating that functions and/or tables do not exist when these tables and functions are visible, accessible and very much do exist, as called? Bob Pawley

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Douglas McNaught
Wes Williams [EMAIL PROTECTED] writes: Even with a primary UPS on the *entire PostgreSQL server* does one still need, or even still recommend, a battery-backed cache on the RAID controller card? [ref SCSI 320, of course] If so, I'd be interest in knowing briefly why. UPSs can fail just

Re: [GENERAL] Postgresql 8

2005-10-26 Thread Dann Corbit
What exactly do those messages say? How are you using the functions? From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bob Pawley Sent: Wednesday, October 26, 2005 11:42 AM To: Postgre General Subject: [GENERAL] Postgresql 8 I am running version 8 on

Re: [GENERAL] Postgresql 8

2005-10-26 Thread Bricklen Anderson
Bob Pawley wrote: I am running version 8 on Windows. Why do I get error messages stating that functions and/or tables do not exist when these tables and functions are visible, accessible and very much do exist, as called? Bob Pawley It would probably help if you supplied some more

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Scott Marlowe
On Wed, 2005-10-26 at 13:38, Wes Williams wrote: Even with a primary UPS on the *entire PostgreSQL server* does one still need, or even still recommend, a battery-backed cache on the RAID controller card? [ref SCSI 320, of course] If so, I'd be interest in knowing briefly why. I'll tell

Re: [GENERAL] Postgresql 8

2005-10-26 Thread Scott Marlowe
On Wed, 2005-10-26 at 13:41, Bob Pawley wrote: I am running version 8 on Windows. Why do I get error messages stating that functions and/or tables do not exist when these tables and functions are visible, accessible and very much do exist, as called? The best way to get help with these

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Welty, Richard
Wes Williams writes: Even with a primary UPS on the *entire PostgreSQL server* does one still need, or even still recommend, a battery-backed cache on the RAID controller card? [ref SCSI 320, of course] If so, I'd be interest in knowing briefly why. it can be a lot faster. if the raid

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Bricklen Anderson
snacktime wrote: I remember a few months back when someone hit the emergency power switch to the whole floor where we host at Internap. Subsequently the backup power system had a cascading failure. Livejournal, who also hosts there, was up all night and into the next day restoring their

Re: [GENERAL] Postgresql 8

2005-10-26 Thread John DeSoi
On Oct 26, 2005, at 2:41 PM, Bob Pawley wrote: I am running version 8 on Windows. Why do I get error messages stating that functions and/or tables do not exist when these tables and functions are visible, accessible and very much do exist, as called? Bob Pawley Most likely cause is

Re: [GENERAL] Postgresql 8

2005-10-26 Thread Dann Corbit
-Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-general- [EMAIL PROTECTED] On Behalf Of John DeSoi Sent: Wednesday, October 26, 2005 12:03 PM To: Bob Pawley Cc: Postgre General Subject: Re: [GENERAL] Postgresql 8 On Oct 26, 2005, at 2:41 PM, Bob Pawley wrote: I am

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

2005-10-26 Thread Claire McLister
I took a look at your map, this is great wonderful that you were already thinking along these lines. Looks like there are two issues here: (1) Getting the data points for users/developers maps, and (2) using the most appropriate mapping technology. I think we can use the Zeemaps service

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Keith C. Perry
Just to add another story... I've been running PostgreSQL on Linux since the 6.x days and back then I was almost always on IDE drives with an EXT2 filesystem. To date, the worse class of experiences I've had was going through the fs recovery steps for EXT2. In those cases I never lost data in

[GENERAL] Error Message

2005-10-26 Thread Bob Pawley
I am attempting to create a new trigger through the "new Trigger" interface on version 8 installed on Windows. The following is the sql that the interface generates CREATE TRIGGER trig1 AFTER INSERT ON process FOR EACH ROW EXECUTE PROCEDURE base(int4);COMMENT ON TRIGGER trig1 ON process IS

Re: [GENERAL] Error Message

2005-10-26 Thread Tom Lane
Bob Pawley [EMAIL PROTECTED] writes: The function name is listed under Functions as - base(int4) Trigger functions cannot take any explicit parameters. regards, tom lane ---(end of broadcast)--- TIP 5: don't forget to

Re: [GENERAL] Need help with INOUT mis-understanding

2005-10-26 Thread Tony Caduto
Tom Lane wrote: Tony Caduto [EMAIL PROTECTED] writes: I have noticed this as well, if I declare OUT params I can modify them to my hearts content before they go out, however if you declare it as a INOUT you can't modify it because it is declared as a constant. Uh, I don't think so.

Re: [GENERAL] Need help with INOUT mis-understanding

2005-10-26 Thread Tom Lane
Tony Caduto [EMAIL PROTECTED] writes: So what you are saying is INOUT params are NOT constants and you can modify them in the function body? If you couldn't modify them, there would be no way to return a new value (ie, anything but the passed-in value), so it'd be pretty broken IMHO ...

Re: [GENERAL] Win32 libpq and ecpg thread safety

2005-10-26 Thread Qingqing Zhou
On Wed, 26 Oct 2005, Bruce Momjian wrote: If you are asking about Win32-specific threading, there is no documentation about it because it works just like Unix threading. At least, that is what I am told. So both libpq and ecpg are thread-safe in Win32? I look into the code, seems at

Re: [GENERAL] Error Message

2005-10-26 Thread Bob Pawley
I'm not sure what you mean. base(int4) is the name of the function that I want to call. It follows the format of an example in a Postgresql book I use (or perhaps misuse). Are you saying that I need to redo the function??? Bob - Original Message - From: Tom Lane [EMAIL PROTECTED]

Re: [GENERAL] Error Message

2005-10-26 Thread Terry Lee Tucker
Bob, You cannot pass argments to trigger functions. You can to other types of functions, but not functions used as triggers. Arguments are passed regarding the old and new records and other built in variables regarding what kind of operation is going on, but all of that is unseen. They must

Re: [GENERAL] Error Message

2005-10-26 Thread Douglas McNaught
Bob Pawley [EMAIL PROTECTED] writes: I'm not sure what you mean. base(int4) is the name of the function that I want to call. It follows the format of an example in a Postgresql book I use (or perhaps misuse). Are you saying that I need to redo the function??? You need to make it a

[GENERAL] Variable return type...

2005-10-26 Thread Cristian Prieto
Hi, I was working in a set of SPs inside PL/pgSQL and I was wonder if I could return a set of variable types from a function, for example, in some time the same function could return a set of tuples with an integer and a string, in other times It may return a set of tuples with an integer,

Re: [GENERAL] Error Message

2005-10-26 Thread Michael Fuhr
On Wed, Oct 26, 2005 at 07:45:19PM -0400, Terry Lee Tucker wrote: You cannot pass argments to trigger functions. You can to other types of functions, but not functions used as triggers. Arguments are passed regarding the old and new records and other built in variables regarding what kind of

Re: [GENERAL] Error Message

2005-10-26 Thread Michael Fuhr
On Wed, Oct 26, 2005 at 07:00:06PM -0600, Michael Fuhr wrote: You *can* pass arguments to trigger functions but it's done a little differently than with non-trigger functions. The function must be defined to take no arguments; it reads the arguments from a context structure instead of in the

Re: [GENERAL] Variable return type...

2005-10-26 Thread Michael Fuhr
On Wed, Oct 26, 2005 at 06:14:23PM -0600, Cristian Prieto wrote: Hi, I was working in a set of SPs inside PL/pgSQL and I was wonder if I could return a set of variable types from a function, for example, in some time the same function could return a set of tuples with an integer and a string,

[GENERAL] Seq Scan but I think it should be Index Scan

2005-10-26 Thread Edoceo Lists
So the details of it: I'm using PostgreSQL 8.0.3 on a Gentoo kernel 2.6.12 on a P4/2.8G+HT proc, with kernel RAID0 on some SATA drives and 1G RAM. Don't know the bus speed. I'm thinking that my queries are not using indexs correctly and therefore taking longer to complete than they should.

Re: [GENERAL] Variable return type...

2005-10-26 Thread Cristian Prieto
Thanks a lot, your answer enlighten me a lot in the path to take to resolve the problem into the database... Thanks man... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Fuhr Sent: Miércoles, 26 de Octubre de 2005 07:38 p.m. To: Cristian Prieto

Re: [GENERAL] escape string type for upcoming 8.1

2005-10-26 Thread Bruce Momjian
Ken Johanson wrote: Bruce Momjian wrote: E'' is more a marker than a type. I realize making E a type might work, but it seems unusual. What we could do is backpatch E'' to 8.0.X as a no-op like it will be in 8.1. Bruce, Is it possible in the 8.1 betas to 'switch on' on the

Re: [GENERAL] Error Message

2005-10-26 Thread Bob Pawley
I have a base table called process. Each row of this table is anchored by a serial column labeled fluid_id. After data has been entered into a row in process, I want to trigger a row in another table labeled specification also with a column labeled fluid_id. I would like this number from

Re: [GENERAL] Win32 libpq and ecpg thread safety

2005-10-26 Thread Bruce Momjian
Qingqing Zhou wrote: On Wed, 26 Oct 2005, Bruce Momjian wrote: If you are asking about Win32-specific threading, there is no documentation about it because it works just like Unix threading. At least, that is what I am told. So both libpq and ecpg are thread-safe in Win32? I

Re: [GENERAL] Seq Scan but I think it should be Index Scan

2005-10-26 Thread Michael Fuhr
On Wed, Oct 26, 2005 at 06:55:54PM -0700, Edoceo Lists wrote: I'm thinking that my queries are not using indexs correctly and therefore taking longer to complete than they should. Index scans aren't necessarily faster than sequential scans: if the query reads a significant amount of the table

Re: [GENERAL] Error Message

2005-10-26 Thread Michael Fuhr
On Wed, Oct 26, 2005 at 07:47:51PM -0700, Bob Pawley wrote: I have a base table called process. Each row of this table is anchored by a serial column labeled fluid_id. What do you mean by anchored by? Is fluid_id the primary key for process? Or is fluid_id a foreign key reference to some

Re: [GENERAL] count( only if true)

2005-10-26 Thread Bruno Wolff III
On Wed, Oct 12, 2005 at 22:24:48 +0200, peter pilsl [EMAIL PROTECTED] wrote: knowledge=# select x,count(case when id5 then 't' else null end) from test2 group by x; x | count ---+--- e | 1 - thats the result I want !!! b | 1 c | 1 d | 0 a |

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread David Garamond
Andrus wrote: Will NTFS file system prevent all corruptions ? If yes, how to convert FAT32 to NTFS without losing data in drive ? iirc (i'm not on windows currently, google for the exact syntax), at the dos prompt, type: convert /fs:ntfs C: and it will schedule a conversion after the next