Re: [GENERAL] passing arrays to shared object functions

2007-04-10 Thread Florian G. Pflug
Jason Nerothin wrote: I've been attempting for a while to figure out how to pass arrays of integers back and forth from a custom c-library that I'd like to plug into my server instance. Although I'm able to usefully pass single integers to a functions I've written, the best I've been able to

Re: [GENERAL] Do I need serializable for this query?

2007-04-10 Thread Florian G. Pflug
William Garrison wrote: I have a table that keeps running totals. It is possible that this would get called twice simultaneously for the same UserID. Do I need to put this in a serializable transaction? Since this gets called often, could it be a performance problem if I make it

[GENERAL] Nice, web-based SNMP-Frontend for pgsnmpd?

2007-04-03 Thread Florian G. Pflug
Hi I've just stumbled across pgsnmpd. It works quite well, though I haven't yet found a web-based monitoring software that works well with pgsnmpd. The problem is that pgsnmpd exportsa bunch of values _per_ database. (The output of snmpwalk looks something like PGSQL-MIB::pgsqlDbDatabase.1.1.3

Re: [GENERAL] Nice, web-based SNMP-Frontend for pgsnmpd?

2007-04-03 Thread Florian G. Pflug
Philip Hallstrom wrote: I've just stumbled across pgsnmpd. It works quite well, though I haven't yet found a web-based monitoring software that works well with pgsnmpd. The problem is that pgsnmpd exportsa bunch of values _per_ database. (The output of snmpwalk looks something like

Re: [GENERAL] PITR and WAL archiving

2007-03-15 Thread Florian G. Pflug
Adam Groves wrote: I have been ramming my head against the wall for the past two evenings, trying to get PITR working and it's gotten to the point where I need to ask someone for help. I'm basically trying to follow the instructions in the manual in chapter 23.3. Which postgres version are you

Re: [GENERAL] Native type for storing fractions (e.g 1/3)?

2007-03-15 Thread Florian G. Pflug
Ron Johnson wrote: CREATE TYPE ty_fraction AS ( n SMALLINT, d SMALLINT ); You'd need a type for large integers first - otherwise your ty_fraction will be quite limited. I think numeric could be used for that, though I don't know if numeric guarantees that at least

Re: [GENERAL] Problem to install pgAdmin

2007-03-15 Thread Florian G. Pflug
Ezequias R. da Rocha wrote: Hi, We here in my job are having many trouble of compatibility with the wx-widgets and it has been a quite difficult job. Having so many installation dependencies we are almost give up. Could someone list all dependencies to install pgAdmin (actually I just need

Re: [GENERAL] Native type for storing fractions (e.g 1/3)?

2007-03-15 Thread Florian G. Pflug
Martijn van Oosterhout wrote: On Thu, Mar 15, 2007 at 09:11:23PM +0100, Florian G. Pflug wrote: You'd need a type for large integers first - otherwise your ty_fraction will be quite limited. I think numeric could be used for that, though I don't know if numeric guarantees that at least

Re: [GENERAL] CREATE TABLESPACE dynamically

2007-03-15 Thread Florian G. Pflug
Richard Huxton wrote: William Garrison wrote: I am writing scripts to create a database that I want to run in my development, testing, and production environments. That means I need to be able to do something like IF condition CREATE TABLESPACE foo LOCATION E'C:\database'; ELSE CREATE

Re: [GENERAL] Support for idempotent schema changes?

2007-03-05 Thread Florian G. Pflug
Joshua D. Drake wrote: David Lowe wrote: Within the context of a script, executing: Begin Statement1 Statement2 Statement3 Commit Where I only wish to commit if the error is specific to the object already existing, and rollback for all other errors, what's the best way to accomplish that?

Re: [GENERAL] Recovering deleted or updated rows

2006-11-16 Thread Florian G. Pflug
Tom Lane wrote: Florian G. Pflug [EMAIL PROTECTED] writes: I'm looking for a way to recover deleted or old versions of accidentally updated rows from a postgres 7.4 database. I've verified that the relevant tables haven't been vacuumed since the accident took place. I was thinking

[GENERAL] Recovering deleted or updated rows

2006-11-15 Thread Florian G. Pflug
Hi I'm looking for a way to recover deleted or old versions of accidentally updated rows from a postgres 7.4 database. I've verified that the relevant tables haven't been vacuumed since the accident took place. I was thinking that it might work to patch the clog so that the offending

Re: [GENERAL] Deathly slow performance on SMP red-hat system

2006-09-01 Thread Florian G. Pflug
Patrick TJ McPhee wrote: % Patrick TJ McPhee wrote: [...] [the query is select 1] % But if I turn on duration logging, I get timings like % LOG: duration: 91.480 ms The logs and data are all one file system, which seems to be on a logical volume with a single disk sitting under it. Florian

Re: [GENERAL] Deathly slow performance on SMP red-hat system

2006-08-29 Thread Florian G. Pflug
Patrick TJ McPhee wrote: I have a Red Hat ELsmp system running on a dual opteron hp server with 16 gigs of memory. I believe the RH installation is straight out of the box. I've compiled postgres 8.1.4 from sources. The problem is that query performance is horrible, and I can't think why,

Re: [GENERAL] Questions about update, delete, ctid...

2006-07-31 Thread Florian G. Pflug
Martijn van Oosterhout wrote: On Mon, Jul 31, 2006 at 01:47:41AM +0200, Florian G. Pflug wrote: I agree, at least for for-update-cursors. If the cursor was not declared for update, then it is not even cleaer to me what the correct behaviour would be. Imagine that you declared a cursor

Re: [GENERAL] Questions about update, delete, ctid...

2006-07-31 Thread Florian G. Pflug
Tom Lane wrote: Florian G. Pflug [EMAIL PROTECTED] writes: I can see how the EPQ machinery can be used to chain forward to the correct row to be updated, even if I originally found an older version (e.g. by searching for a specific ctid). But for non-for update-cursors, the newest version

Re: [GENERAL] Questions about update, delete, ctid...

2006-07-30 Thread Florian G. Pflug
Martijn van Oosterhout wrote: On Fri, Jul 28, 2006 at 12:00:19PM +0200, DANTE Alexandra wrote: - is it correct to think that the ctid of the old version of the tuple is a link to newer version ? In my example, is it correct to think that the tuple : 140049|0 | (0,12) | 11 |

Re: [GENERAL] Questions about update, delete, ctid...

2006-07-30 Thread Florian G. Pflug
Martijn van Oosterhout wrote: On Sun, Jul 30, 2006 at 04:37:26PM +0200, Florian G. Pflug wrote: Martijn van Oosterhout wrote: The word become is not really right. The old version has become invisible to you and the new version is visible. Some other transactions will see the old one, some

Re: [GENERAL] Questions about update, delete, ctid...

2006-07-30 Thread Florian G. Pflug
Tom Lane wrote: Florian G. Pflug [EMAIL PROTECTED] writes: Martijn van Oosterhout wrote: It's the t_ctid field of the tuple header. But I don't see what that has to do with WHERE CURRENT OF. That expression should return the tuple visible to your transaction, not some updated version which you

Re: [GENERAL] calling stored procedure using ECPG

2006-07-20 Thread Florian G. Pflug
Jasbinder Bali wrote: Hi, Can anyone please tell me how do I call a stored procedure using ECPG?? A code snippet would really be handy.. I don't know about ECPG, but doing select myfunc(); should work I guess.. greetings, Florian Pflug ---(end of

Re: [GENERAL] apparent wraparound

2006-07-15 Thread Florian G. Pflug
Gregory S. Williamson wrote: You need to edit the postgresql.conf file and increase the max_fsm_pages and max_fsm_relations parameters and then restart postgres (I think you have to actually stop and restart, as opposed to a reload, but I could be wrong). You may end up needing to adjust the

[GENERAL] Backing up the currently used wal segment

2006-07-06 Thread Florian G. Pflug
Hi I've implemented replication to a warm standby using wal logshipping now. The only remaining problem is that there is no way in 8.1 to force postgres to close the current wal segment, and start using a new one. Therefor, if there is little traffic, changes can take a long time to actually

Re: [GENERAL] Backing up the currently used wal segment

2006-07-06 Thread Florian G. Pflug
Merlin Moncure wrote: On 7/6/06, Florian G. Pflug [EMAIL PROTECTED] wrote: Hi I've implemented replication to a warm standby using wal logshipping now. The only remaining problem is that there just how exactly does this work? are you constantly firing up the standby server? Postgres

Re: [GENERAL] Long term database archival

2006-07-06 Thread Florian G. Pflug
Karl O. Pinc wrote: Hi, What is the best pg_dump format for long-term database archival? That is, what format is most likely to be able to be restored into a future PostgreSQL cluster. Mostly, we're interested in dumps done with --data-only, and have preferred the default (-F c) format. But

Re: [GENERAL] Best way to deal with quote_literal issue?

2006-07-06 Thread Florian G. Pflug
Karen Hill wrote: Hello. I have client software that I wrote which uses parameters in function calls to postgresql. I use quote_literal in postgresql functions. That means I get data that is quoted when it finally ends up in the tables which I don't want. I know that you shouldn't trust

Re: [GENERAL] Null and Void() - Or, Abandon All Hope Ye Who allow

2006-06-28 Thread Florian G. Pflug
[EMAIL PROTECTED] wrote: Date and Pascal hate nulls. One even goes so far as to say that if you permit NULLs in a database, then the results from *every* query is suspect. So they turn perform backflips suggesting ways to avoid nulls. None, so far, seem appealing. To me, nulls are quite useful

Re: [GENERAL] Null and Void() - Or, Abandon All Hope Ye Who allow

2006-06-28 Thread Florian G. Pflug
Berend Tober wrote: Florian G. Pflug wrote: [EMAIL PROTECTED] wrote: Date and Pascal hate nulls. ...the functions described by those functional dependencies are not required to be defined for every possible value - let's say you have a function dependency A - B - meaning

Re: [GENERAL] Bitwise OR in a group statement

2006-06-22 Thread Florian G. Pflug
Greg Gazanian wrote: I was wondering if anyone happens to know whether there is an Aggregate function available in Postgres that can do an OR on a column of the bit varying type. For example I would like to do something as follows: bitstring * 1110 0100 SELECT

Re: [GENERAL] aggregate of bitstrings

2006-06-22 Thread Florian G. Pflug
TJ O'Donnell wrote: AHA! I hadn't encountered any null values in my bitstrings. and having to include 'where xxx is not null' is rather inconvenient and easy to forget. indeed bitor(B'1000',null) returns null but as a test, i nulled one row's data (the bitstring column portion only) and my

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-20 Thread Florian G. Pflug
louis gonzales wrote: Florian, I understand where you're coming from. Indexes are always unique and all RDBMS systems use them to 'uniquely' identify a row from the the perspective of internal software management. Surely there are non-unique indices - meaning indices for which there are more

Re: [GENERAL] dynamic sorting...

2006-06-20 Thread Florian G. Pflug
Yavuz Kavus wrote: this works fine, however the next doesnt(i couldnt compile it ) : CREATE OR REPLACE FUNCTION ftest(_sort_column varchar, _sort_direction varchar) RETURNS refcursor AS $BODY$ declare _result_set refcursor; begin open _result_set for select firstname, lastname

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-20 Thread Florian G. Pflug
Wes wrote: On 6/20/06 5:07 AM, Florian G. Pflug [EMAIL PROTECTED] wrote: My suggestion was to create the fk _before_ loading the data, and disable it similarly to what --disable-triggers doest. It turned out, however, that a FK always depends on a unique index (be it a primary key

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-19 Thread Florian G. Pflug
Wes wrote: Is there a way to add a foreign key constraint without having to wait for it to check the consistency of all existing records? If a database is being reloaded (pg_dumpall then load), it really shouldn't be necessary to check the referential integrity - or at least I should be able to

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-19 Thread Florian G. Pflug
Wes wrote: You could create the fk-constraints _first_, then disable them, load the data, reindex, and reenable them afterwards. pg_dump/pg_restore can enable and disable fk-constraints before restoring the data, I believe. It does so by tweaking the system catalogs. Are referring to

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-19 Thread Florian G. Pflug
louis gonzales wrote: Florian, Are you certain: You can only create an FK if the fields you are referencing in the foreign table form a PK there. And creating a PK implicitly creates an index, which you can't drop without dropping the PK :-( Arg.. Should have written unique index instead

Re: [GENERAL] Changing array subscripting to zero-offset

2006-06-18 Thread Florian G. Pflug
Erin Sheldon wrote: Hello everyone - Array columns are, by default, 1-offset in their subscripting. Since I usually call postgres from a language with zero-offset, I would prefer that postgres conform to that. The online documentation hints that this may be configurable but I haven't been

Re: [GENERAL] VACUUMing sometimes increasing database size / sometimes

2006-06-16 Thread Florian G. Pflug
Douglas McNaught wrote: Nitin Verma [EMAIL PROTECTED] writes: Will 7.3.2 Dump made up of copies using pg_dump import without any migration to 8.0+? What I need isn't a once process and will go as a automated script, in a way that user will not even get to know (if he isn't reading that logs)

Re: [GENERAL] Omitting tablespace creation from pg_dumpall...

2006-06-16 Thread Florian G. Pflug
Chander Ganesan wrote: Tom Lane wrote: Chander Ganesan [EMAIL PROTECTED] writes: I'd like to suggest that a feature be added to pg_dumpall to remove tablespace definitions/creation from the output. While the inclusion is important for backups - it's equally painful when attempting to

Re: [GENERAL] Fabian Pascal and RDBMS deficiencies in fully implementing

2006-06-16 Thread Florian G. Pflug
Trent Shipley wrote: On Tuesday 2006-06-13 09:26, David Fetter wrote: On Tue, Jun 13, 2006 at 09:18:17AM -0600, Scott Ribe wrote: To hold it up as any kind of paradigm is really misinformed. SQL had something that relational algebra/relational calculus did not have, which is that somebody

Re: [GENERAL] VACUUMing sometimes increasing database size / sometimes

2006-06-15 Thread Florian G. Pflug
Nitin Verma wrote: Were these bugs fixed by 7.3.2, if not what version should I look for? http://archives.postgresql.org/pgsql-admin/2001-06/msg5.php http://archives.postgresql.org/pgsql-hackers/2000-04/msg00083.php Ahm... 7.3.2 is *very* outdated. The current version of postgresql is

Re: [GENERAL] Searching BLOB

2006-06-13 Thread Florian G. Pflug
James Watson wrote: What I was hoping someone could help me out with was identifying the best possible solution to use. 1. How can I store the word doc's in the DB, would it be best to use a BLOB data type? You can use the column type bytea, which can store (nearly) arbitrary amounts of binary

Re: [GENERAL] pg_dump: missing pg_database entry

2006-06-13 Thread Florian G. Pflug
[EMAIL PROTECTED] wrote: Hello, I'm experiencing a strange problem with PostgreSQL 7.4.9. One of my database production servers has 2 large databases, it's still possible to connect to them and pass queries, but the pg_database system table is empty, which prohibits such actions as dumping the

Re: [GENERAL] Help speeding up this query - maybe need another index?

2006-06-13 Thread Florian G. Pflug
Pat Maddox wrote: Here's my SQL query. I don't think it's too gigantic, but it is kind of beastly: SELECT COUNT(r) FROM trainer_hand_results r, trainer_scenarios s, trainer_scenario_stats stats WHERE r.user_id=1 AND r.trainer_scenario_id=s.id AND s.id=stats.trainer_scenario_id AND

Re: [GENERAL] LDAP authentication

2006-05-26 Thread Florian G. Pflug
[EMAIL PROTECTED] wrote: Hello, I saw many messages about ldap authentication but I´m still not sure if PostgreSQL can use it? Are you using windows or unix? On unix, postgresql can use pam (pluggable authentication modules) for authentication. There are pam modules for about any

Re: RES: [GENERAL] LDAP authentication

2006-05-26 Thread Florian G. Pflug
[EMAIL PROTECTED] wrote: Are you using windows or unix? On unix, postgresql can use pam We are using a mix of windows and unix+linux and I think PAM can not be used with windows. Am I right? Is there another way? Not that I would know... But try googling around for pam and windows. Theres

Re: [GENERAL] background triggers?

2006-05-25 Thread Florian G. Pflug
Rafal Pietrak wrote: On Wed, 2006-05-24 at 13:36 +0200, Sim Zacks wrote: My understanding of Listen/Notify is that it is a completely disconnected process running on the database server. Yes. But In my particular case (and I presume, the intention of 'bacground triggers' is that) a programmer

Re: [GENERAL] background triggers?

2006-05-25 Thread Florian G. Pflug
Dawid Kuroczko wrote: On 5/25/06, Rafal Pietrak [EMAIL PROTECTED] wrote: Well, exactly not being interested in the outcome is IMHO the reason why your demands clash with archtecture of a RDBMS. Most RDBMS go a long way to ensure consistency and safety of your data, once they promised

Re: [GENERAL] column order

2006-05-24 Thread Florian G. Pflug
Michael Glaesemann wrote: On May 24, 2006, at 11:54 , nuno wrote: does postgresql guarantee you that the columns in the result set would be ordered as specified in the query (i.e. id, firstname, lastname, dob) ? No. If you want a specific order, use the ORDER BY clause. I think the OP was

Re: [GENERAL] Clearing out old idle connections

2006-05-24 Thread Florian G. Pflug
Richard Huxton wrote: Gavin Hamill wrote: Hullo :) We have pg 8.1.3 and for whatever reason (network blips, poor pooling on behalf of the client, etc.) we sometimes see a large number (dozens) of old connections in the idle state which never get reused. They should expire based on your

Re: [GENERAL] challenging constraint situation - how do I make it

2006-05-24 Thread Florian G. Pflug
Kenneth Downs wrote: Alban Hertroys wrote: Kenneth Downs wrote: Alban Hertroys wrote: When encountering this problem I usually wonder why there isn't a data type that can store a timestamp and can be used to create a UNIQUE INDEX over it's values. That'd be wonderful. Well, maybe one day

Re: [GENERAL] More confirmation: pgadmin3 freezeup fixed by wxgtk

2006-05-23 Thread Florian G. Pflug
Kenneth Downs wrote: I've gotten a chance to upgrade wxGTK to 2.6.3.2. I can no longer deliberately reproduce the freezeup caused by a double-click on selected text in the query analyzer. Anyone caring about a non-freezable pgadmin in their distro should notify the vendor of the distro, or

Re: [GENERAL] make check fails over NFS or tmpfs

2006-05-23 Thread Florian G. Pflug
Martijn van Oosterhout wrote: On Mon, May 22, 2006 at 12:52:33PM -0400, Greg Stark wrote: Rafael Martinez, Guerrero [EMAIL PROTECTED] writes: Why do you think 'intr' is a bad thing, from man pages: If an NFS file operation has a major timeout and it is hard mounted, then allow

Re: [GENERAL] background triggers?

2006-05-23 Thread Florian G. Pflug
Sim Zacks wrote: Is there any way to write a statement trigger that runs in the background? In my testing, when I have an After Insert For Each Statement trigger, the function call does not end until the trigger is finished processing. What I would like to do, and please let me know if there

Re: [GENERAL] background triggers?

2006-05-23 Thread Florian G. Pflug
Rafal Pietrak wrote: On Tue, 2006-05-23 at 15:56 +, Chris Browne wrote: The use that I have for this at the moment, and I can think of many other uses, is that I want to populate a statistics table each time that a table is updated. But the code to populate the table takes 10 seconds to

Re: [GENERAL] Let's make CPgAN!

2006-05-22 Thread Florian G. Pflug
Agent M wrote: I think the implementation of postgresql installable packages (and package-space) should precede this idea. Then, any package management system can install the packages. Having a standardizes package management for postgresql would be great. I believe one could use schemas to

Re: [GENERAL] Let's make CPgAN!

2006-05-22 Thread Florian G. Pflug
elein wrote: This issue is a very old issue and people have not come up with the definitive solution to distributing datablades as Stonebraker called them. True, but OTOH there is no definitive solution for OS-level package management too, but still apt-get or rpm do a pretty decent job. So,

Re: [GENERAL] Let's make CPgAN!

2006-05-22 Thread Florian G. Pflug
Dawid Kuroczko wrote: On 5/22/06, Florian G. Pflug [EMAIL PROTECTED] wrote: elein wrote: This issue is a very old issue and people have not come up with the definitive solution to distributing datablades as Stonebraker called them. True, but OTOH there is no definitive solution for OS-level

Re: [GENERAL] GUI Interface

2006-05-18 Thread Florian G. Pflug
Dave Page wrote: -Original Message- From: A.M. [mailto:[EMAIL PROTECTED] Sent: 15 May 2006 15:05 To: Dave Page Subject: Re: [GENERAL] GUI Interface I'm unable to reproduce this problem with pgAdmin SVN-trunk built with wxGTK 2.6.3 on Slackware-current with KDE. Can anyone else

Re: [GENERAL] GUI Interface

2006-05-18 Thread Florian G. Pflug
A.M. wrote: Excellent catch! I was wondering why I couldn't get it to freeze. I now have a backtrace: poll() wxPaletteBase::~wxPaletteBase g_main_context_check() g_main_run_loop_run() gtk_main() wxEventLoop::Run() So the evidence points to a wx bug in the destructor to wxPaletteBase perhaps?

Re: [GENERAL] GUI Interface

2006-05-18 Thread Florian G. Pflug
Florian G. Pflug wrote: A.M. wrote: Excellent catch! I was wondering why I couldn't get it to freeze. I now have a backtrace: poll() wxPaletteBase::~wxPaletteBase g_main_context_check() g_main_run_loop_run() gtk_main() wxEventLoop::Run() So the evidence points to a wx bug in the destructor

Re: [GENERAL] GUI Interface

2006-05-15 Thread Florian G. Pflug
Dave Page wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Florian G. Pflug Sent: 14 May 2006 18:50 To: Tino Wildenhain Cc: Kenneth Downs; pgsql-general@postgresql.org Subject: Re: [GENERAL] GUI Interface It only happens in pgAdmin III, though

Re: [GENERAL] GUI Interface

2006-05-14 Thread Florian G. Pflug
Tino Wildenhain wrote: Kenneth Downs schrieb: Dave Page wrote: On my linux box, it also has the dubious honor of being the only program I have ever seen that can lock X hard, with killing the X server being the only rescue (if you call that a rescue). It can connect over

Re: [GENERAL] How to allow non-local to postgreSQL

2006-05-09 Thread Florian G. Pflug
leo camalig wrote: Good Day I Just want to ask on how to allow a non-local in PostgreSQL without adding it in pg-hba.conf You don't. pg_hba.conf is the place where you can specify who can connect from where to which database using what authentication method. Your only alternative to

Re: [GENERAL] Alternative for vacuuming queue-like tables

2006-05-04 Thread Florian G. Pflug
Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: I'd actually been thinking about this recently, and had come up with the following half-baked ideas: Allow a transaction to specify exactly what tables it will be touching, perhaps as an extension to BEGIN. Should any action that

Re: [GENERAL] The planner chooses seqscan+sort when there is an

2006-05-03 Thread Florian G. Pflug
Csaba Nagy wrote: Docs say: Enables or disables the query planner's use of sequential scan plan types. It's not possible to suppress sequential scans entirely, but turning this variable off discourages the planner from using one if there are other methods available. Note the second sentence.

[GENERAL] Using a pointer as statetype for an aggregate

2006-05-02 Thread Florian G. Pflug
Hi I've now completed my implementation of a collect_distinct aggregate, and it seems to work. My statetype is basically a pointer to a hashtable (allocated from the aggcontext). Since using internal as statetype is unsupported, I use int8, and just cast my pointer back and forth from int8. It

Re: [GENERAL] Using a pointer as statetype for an aggregate

2006-05-02 Thread Florian G. Pflug
Tom Lane wrote: Florian G. Pflug [EMAIL PROTECTED] writes: why doesn't postgres allow internal as statetype? Because it's not a type. If it were, it certainly wouldn't have the semantics you seem to hope for (ie, pass by reference type but don't actually try to copy the bits) Could I

Re: [GENERAL] Alternative for vacuuming queue-like tables

2006-04-29 Thread Florian G. Pflug
Csaba Nagy wrote: There is, I believe, a problem there; there is a scenario where data can get dropped out from under those old connections. This has been added to the TODO... http://www.postgresql.org/docs/faqs.TODO.html * Make CLUSTER preserve recently-dead tuples per MVCC requirements

Re: [GENERAL] configure: error

2006-04-29 Thread Florian G. Pflug
[EMAIL PROTECTED] wrote: I am trying to install PostgreSQL v.8.3.1. I have unpacked the gz and tar file. Next, I have executed the configure file. Then, I receive the following message: configure: error: no acceptable C compiler found in $PATH I think I have to get a C compiler and to install

Re: [GENERAL] file I/O in plpgsql

2006-04-29 Thread Florian G. Pflug
Jessica M Salmon wrote: I'm trying to write out query results to a text file from within a plpgsql function, but having trouble. Can anyone tell me if this is possible? I'm trying to perform \o filename, then select, but it squawks about no destination for the select results. Any pointers? This

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-26 Thread Florian G. Pflug
Richard Huxton wrote: Florian G. Pflug wrote: Do you see any other way via which I could archive my desired result? (Apart from modifying every client in existence) Could you modify pgpool to act as a wrapper for this? Hm.. should be possible.. I'll look into this. Thanks for the hint

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-23 Thread Florian G. Pflug
Tom Lane wrote: Florian G. Pflug [EMAIL PROTECTED] writes: I'd like to be able to connect to postgres, and automatically assume a specific role. Why don't you just connect as that role to begin with? This seems like a pretty low-value frammish. Because I want each user to have his or her

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-23 Thread Florian G. Pflug
Stephen Frost wrote: * Florian G. Pflug ([EMAIL PROTECTED]) wrote: I'd like to be able to connect to postgres, and automatically assume a specific role. Couldn't you just have 'SET ROLE whatever' in the user's .psqlrc? At least, if that's how they're connecting I think that'd work... I can

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-23 Thread Florian G. Pflug
Stephen Frost wrote: * Florian G. Pflug ([EMAIL PROTECTED]) wrote: I can do that with alter user user set role whatever too... But I'd like my users to be able to connect as either role dev or role admin, depending on the task they want to do. Alright, can you describe *exactly* what you'd

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-23 Thread Florian G. Pflug
Stephen Frost wrote: * Florian G. Pflug ([EMAIL PROTECTED]) wrote: Stephen Frost wrote: Alright, can you describe *exactly* what you'd want to see then? Is this a new command-line option to psql (perhaps something like -v?)? Or do you need it to be supported by libpq through a new connect

Re: [GENERAL] sudo-like behavior

2006-04-22 Thread Florian G. Pflug
Agent M wrote: Sorry, but you misunderstand- nowhere am I interested in the role's password. My previous suggestion was to add a password to set session authorization itself so that if the authorization were to be reset, it would need to be done with that password; the password itself could be

Re: [GENERAL] sudo-like behavior

2006-04-22 Thread Florian G. Pflug
Tom Lane wrote: Florian G. Pflug [EMAIL PROTECTED] writes: Why don't you just use SET SESSION AUTHORIZATION somerole, and then scan the to-be-executel sql scripts for any occurence of reset session authorization, and ignore the script it matches. What would probably be better is a way to do

[GENERAL] Automatically assuming a specific role after connecting to pg

2006-04-22 Thread Florian G. Pflug
I'd like to be able to connect to postgres, and automatically assume a specific role. I imagine something like create role myuser ; create role dev noinherit ; create role admin noinherit superuser ; grant dev to myuser ; grant admin to myuser ; Now, I'd like a connect as myuser/admin to be

Re: [GENERAL] Partial indexes

2006-04-18 Thread Florian G. Pflug
Tom Lane wrote: elein [EMAIL PROTECTED] writes: I think I want to: create unique index pk on table tbl (keyp1, keyp2); don't you want create unique inde pk on table tbl (keyp1, keyp2) where keyp3 is null here? create unique index range on table tbl (keyp1, keyp2, keyp3) where

Re: [GENERAL] Create database bug in 8.1.3 ?

2006-04-11 Thread Florian G. Pflug
Milen Kulev wrote: Hi Listers, I have the following problem (OS= RHELU2 , PG version= 8.1.3) when I try to Create a database : postgres=# CREATE DATABASE world3 TEMPLATE=template1 ENCODING='UTF8' TABLESPACE=tbs1 ; CREATE DATABASE Then I am backup-ing the database (a small toy DB) with

Re: [GENERAL] About checking all dead lock tables

2006-04-11 Thread Florian G. Pflug
Michael Fuhr wrote: On Thu, Apr 06, 2006 at 03:36:33PM -0400, Emi Lu wrote: How to check whether a table is locked? You can monitor locks by querying the pg_locks view. http://www.postgresql.org/docs/8.0/interactive/monitoring-locks.html

[GENERAL] Workaround for custom aggregate which would need internal as statetype

2006-04-10 Thread Florian G. Pflug
Hi I'm trying to write an aggrecate collect_distinct(int8) which puts all distinct values into an array. My first try was defining an aggregate collect using array_append, and doing select collect(distinct field) .., but this is quite slow - probably because distinct sorts the values, instead of

Re: [GENERAL] Workaround for custom aggregate which would need internal

2006-04-10 Thread Florian G. Pflug
Tom Lane wrote: Florian G. Pflug [EMAIL PROTECTED] writes: Using perl, and a perl-hash was even slower, so I wrote my to c-functions (actualy c++), which use a STL hash_set to filter out duplicates. This makes me fairly nervous, because what's going to ensure that the memory used

Re: [GENERAL] Transactions

2006-03-18 Thread Florian G. Pflug
Kevin Brown wrote: I've been creating a databased application with PostgreSQL for a while now and have loved it, though we just recently stumbled on an interesting bug. I have a particular dialog which can do all kinds of incredibly complicated things to the database. Of course I didn't want

Re: [GENERAL] Transactions

2006-03-18 Thread Florian G. Pflug
Kevin Brown wrote: On Saturday 18 March 2006 12:31, Florian G. Pflug wrote: I've been creating a databased application with PostgreSQL for a while now and have loved it, though we just recently stumbled on an interesting bug. I have a particular dialog which can do all kinds of incredibly

Re: [GENERAL] in Pl/PgSQL, do commit every 5000 records

2006-03-11 Thread Florian G. Pflug
Emi Lu wrote: Florian G. Pflug wrote: snipped code of stored procedure Are you aware of the insert into table (field1, ..., fieldn) select val1, .., valn from command? It'd be much faster to use that it it's possible... It did faster. Thank you Florian. Could you hint me why insert

Re: [GENERAL] in Pl/PgSQL, do commit every 5000 records

2006-03-10 Thread Florian G. Pflug
Emi Lu wrote: The example I have is: CREATE OR REPLACE function test() returns boolean AS $$ DECLARE ... ... counterINTEGER := 0; BEGIN ... ... query_value := ' .' ; OPEN curs1 FOR EXECUTE query_value; LOOP FETCH curs1 INTO studid; EXIT WHEN NOT FOUND;

Re: [GENERAL] in Pl/PgSQL, do commit every 5000 records

2006-03-10 Thread Florian G. Pflug
Emi Lu wrote: Florian G. Pflug wrote: snipped code of stored procedure Are you aware of the insert into table (field1, ..., fieldn) select val1, .., valn from command? It'd be much faster to use that it it's possible... greetings, Florian Pflug It did faster. Thank you Florian

Re: [GENERAL] Is the ACCESS EXCLUSIVE lock for TRUNCATE really

2006-03-07 Thread Florian G. Pflug
Tom Lane wrote: Florian G. Pflug [EMAIL PROTECTED] writes: Tom Lane wrote: Until when? How would you synchronize the switchover? Every snapshot would either contain the old, or the new version of the corresponding pg_class tuple. The ones using the old version couldn't possible be writer

Re: [GENERAL] [OFFTOPIC] Typo3 + Postgresql anyone?

2006-03-06 Thread Florian G. Pflug
Florian G. Pflug wrote: Hi My company wants to run Typo3, and I'd like it to run against postgresql instead of mysql (Don't want to have to administer a mysql database ;-). I've googled a bit now, and it seems that I need ADODB for php + some Typo3 extension. Does anyone know of a howto

[GENERAL] Is the ACCESS EXCLUSIVE lock for TRUNCATE really necessary?

2006-03-06 Thread Florian G. Pflug
Hi I know that TRUNCATE needs to acquire an ACCESS EXCLUSIVE lock, because it will remove the datafile on commit, and needs to ensure that noone will be using it anymore by then. For a lot of applications (at least mine) this is imposes problems. I'd like to use TRUNCATE in a few places, not

Re: [GENERAL] Is the ACCESS EXCLUSIVE lock for TRUNCATE really

2006-03-06 Thread Florian G. Pflug
Tom Lane wrote: Florian G. Pflug [EMAIL PROTECTED] writes: Now, I was thinking if TRUNCATE couldn't just let relfilenode in pg_class point to a new datafile, and leave the old one in place. Until when? How would you synchronize the switchover? Every snapshot would either contain the old

[GENERAL] [OFFTOPIC] Typo3 + Postgresql anyone?

2006-03-01 Thread Florian G. Pflug
Hi My company wants to run Typo3, and I'd like it to run against postgresql instead of mysql (Don't want to have to administer a mysql database ;-). I've googled a bit now, and it seems that I need ADODB for php + some Typo3 extension. Does anyone know of a howto that explains what software

Re: [GENERAL] Adding columns to a view

2005-12-29 Thread Florian G. Pflug
Ingo van Lil wrote: On 28 Dec 2005, Florian G. Pflug wrote: I could think of a few situations where extending a view might be useful, and I'd appreciate to see it supported. I don't see any reason not to allow it as long as no existing columns are removed or have their type changed. Well

Re: [GENERAL] Adding columns to a view

2005-12-27 Thread Florian G. Pflug
Ingo van Lil wrote: Hi there, is there any way to add new columns to a view without dropping and recreating it (and thus every other view that depends on it)? A friend of mine came up with a crude hack that involves manipulating the reltype flag in pg_class so Postgres thinks the view is

Re: [GENERAL] Toolkit for creating editable grid

2005-12-16 Thread Florian G. Pflug
Andrus wrote: Florian, your reply is not is not in news.postgresql.org server. How to receive all messages using news.postgresql.org server ? It is tedious to check the newsgroup archives using web interface also. Bad, but I guess there is nothing I can do about that... I'm subscriber of the

Re: [GENERAL] Transacciones Anidadas

2005-12-16 Thread Florian G. Pflug
Juan Garcés Bustamante wrote: Hola Estoy trabajando con Postgres 8.0.3 en Ubuntu. Necesito realizar transacciones anidadas, pero no logro que se aborten transacciones intermedias al abortarse una superior. The main language spoken here is english. If you ask your questions in english, you'll

Re: [GENERAL] Toolkit for creating editable grid

2005-12-15 Thread Florian G. Pflug
Andrus wrote: Andrus wrote: I want to create editable grid (client application) for large Postgres table: At startup this grid show first screenful of records and allows to edit them. When user presses page down key, this grid should read next screenful of records and allow to edit them etc.

Re: [GENERAL] Strange VACUUM behaviour

2005-12-05 Thread Florian G. Pflug
Jim C. Nasby wrote: We started a VACUUM (not a VACUUM FULL) on one of your postgres 7.4.9 databases a few days ago. It's still running yet, and says the folloing about once per second: INFO: index pg_toast_2144146_index now contains 1971674 row versions in 10018 pages DETAIL: 4 index row

Re: [GENERAL] Missing variable role in pg_settings?

2005-12-05 Thread Florian G. Pflug
Tom Lane wrote: Bruce Momjian pgman@candle.pha.pa.us writes: Based on this email, should we be showing ROLE from SHOW ALL? Only if you think we should be showing session_authorization too. That was marked no_show_all quite a long time ago, and we have not got complaints about it... Hm, but

  1   2   >