[GENERAL] Looking for a good ERD Tool

2005-07-06 Thread Rob Brenart
I'm looking for a good ERD tool that's designed to work with PostgreSQL... currently I use the one found here http://www.fabforce.net/dbdesigner4/index.php for MySQL, and I just create the actual tables and such by hand... kinda of a kludge, and I lose all the reverse engineering benefits... bu

Re: [GENERAL] Seg fault in postgres 7.4.7?

2005-07-06 Thread Michael Fuhr
On Wed, Jul 06, 2005 at 06:55:09PM -0700, Akash Garg wrote: > This is Suse Enterprise 9.0 running on a quad Opteron Newisys machine. > It has 32 gb of RAM. We didn't do anything to fancy with the setup > of the OS or postgres. > > No core dump is available. Where did you look for a core dump?

Re: [GENERAL] About unsigned smallint?

2005-07-06 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > On Wed, Jul 06, 2005 at 11:30:52PM +0200, Dawid Kuroczko wrote: >> If you ask here, you'll probably get a good explanation why there >> aren't unsinged types. > Yeah, they are against the SQL standard apparently; Not so much "against it" as "not in it"

Re: [GENERAL] ERROR: cache lookup failed for relation 438095645

2005-07-06 Thread Tom Lane
Joe Markwardt <[EMAIL PROTECTED]> writes: > On Wed, 2005-07-06 at 14:04 -0400, Tom Lane wrote: >> They appear to be triggers for a foreign-key constraint between >> pl_inventory_analyzer_files_table and pl02_status_table ... so I guess >> the question is what happened to the latter? > I'm not sur

Re: [GENERAL] Adding miscadmin.h generates errors ?

2005-07-06 Thread Michael Fuhr
On Wed, Jul 06, 2005 at 02:51:53PM -0700, Otto Blomqvist wrote: > After adding miscadmin.h to my source I get "some" errors, shown below. I'm > sure its something simple like adding a flag or similar, but I'v spent hours > on this now. Im running Fedora 3 and Postgres 8.0.3. GCC 3.4.3 20050227. If

Re: [GENERAL] Adding miscadmin.h generates errors ?

2005-07-06 Thread Alvaro Herrera
On Wed, Jul 06, 2005 at 02:51:53PM -0700, Otto Blomqvist wrote: > After adding miscadmin.h to my source I get "some" errors, shown below. I'm > sure its something simple like adding a flag or similar, but I'v spent hours > on this now. Im running Fedora 3 and Postgres 8.0.3. GCC 3.4.3 20050227. Do

Re: [GENERAL] 7.3.2 closing connections, sometimes

2005-07-06 Thread felix
On Wed, Jul 06, 2005 at 05:44:44PM -0400, Bruce Momjian wrote: > [EMAIL PROTECTED] wrote: > > > > Could a corrupt db cause these mood swings? And if so, would that > > persist even across dropdb / creatdb? > > Yes, that is possible, but usually it would fail consistently. Have you > run memtest

Re: [GENERAL] About unsigned smallint?

2005-07-06 Thread Alvaro Herrera
On Wed, Jul 06, 2005 at 11:30:52PM +0200, Dawid Kuroczko wrote: > If you ask here, you'll probably get a good explanation why there > aren't unsinged types. My guess is that unsigned types add > complexity which is not really judged by their usefullness, but > thats only a guess. Yeah, they are

[GENERAL] Adding miscadmin.h generates errors ?

2005-07-06 Thread Otto Blomqvist
After adding miscadmin.h to my source I get "some" errors, shown below. I'm sure its something simple like adding a flag or similar, but I'v spent hours on this now. Im running Fedora 3 and Postgres 8.0.3. GCC 3.4.3 20050227. Any ideas ? Thanks /Otto Blomqvist gcc -Wall -c commfunct.c In file in

Re: [GENERAL] 7.3.2 closing connections, sometimes

2005-07-06 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: > > Bruce Momjian writes: > > > This message is from the backend exiting abruptly. Is isn't an "ERROR" > > > as we define it for logging purposes. That's why there is nothing in > > > the logs. > > > > Nonetheless I'd expect there to be at least a postmaster complaint a

Re: [GENERAL] About unsigned smallint?

2005-07-06 Thread Dawid Kuroczko
On 7/6/05, Ying Lu <[EMAIL PROTECTED]> wrote: > Greetings, > > Can I know whether postgreSQL 8.0 supports unsigned smallint please? I > looked at the doc, it seems that OID is unsigned interger. While I was > trying to create a simple table as: > create table test (id unsigned smallint); >

Re: [GENERAL] can't drop sequence even though table is gone

2005-07-06 Thread Scott Marlowe
On Wed, 2005-07-06 at 15:54, Kevin Murphy wrote: > I'm using PG 8.0.3 on Mac OS X 10.4.1. > > I've dropped some tables that had associated sequences, but I am unable > to drop the sequences. I haven't noticed any errors or crashes. It > will be easy to rebuild the whole database. I'm just rep

Re: [GENERAL] ms-sql OUTPUT equivalent

2005-07-06 Thread Douglas McNaught
Clark Allan <[EMAIL PROTECTED]> writes: > Is there an equivelent to the OUTPUT parameter in MS-SQL? Not in the current release, but the upcoming 8.1 release will have it. -Doug ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

Re: [GENERAL] can't drop sequence even though table is gone

2005-07-06 Thread Douglas McNaught
Kevin Murphy <[EMAIL PROTECTED]> writes: > Schema | Name | Type | Owner > +--+--+--- > public | seq_SML_sources_id | sequence | fable > public | seq_SML_symbols_id | sequence | fable > public | seq_Tag

[GENERAL] can't drop sequence even though table is gone

2005-07-06 Thread Kevin Murphy
I'm using PG 8.0.3 on Mac OS X 10.4.1. I've dropped some tables that had associated sequences, but I am unable to drop the sequences. I haven't noticed any errors or crashes. It will be easy to rebuild the whole database. I'm just reporting this because it seemed unusual. => \ds

[GENERAL] About unsigned smallint?

2005-07-06 Thread Ying Lu
Greetings, Can I know whether postgreSQL 8.0 supports unsigned smallint please? I looked at the doc, it seems that OID is unsigned interger. While I was trying to create a simple table as: create table test (id unsigned smallint); or create table test (id

[GENERAL] ms-sql OUTPUT equivalent

2005-07-06 Thread Clark Allan
Is there an equivelent to the OUTPUT parameter in MS-SQL? here is an example: CREATE PROCEDURE GetPagedList( @CurrentPage   tinyint, @PageSize   tinyint, @TotalRecords   int OUTPUT,)ASSet NoCount On-- ...some code here...-- Return the total number of records

Re: [GENERAL] current_user inside SECURITY DEFINER function?

2005-07-06 Thread Stephen Frost
* Peter Eisentraut ([EMAIL PROTECTED]) wrote: > Stephen Frost wrote: > > * Richard Hayward ([EMAIL PROTECTED]) wrote: > > > Is there any way of getting the user? > > > > You might try session_user. 8.1 will hopefully clean this up some. > > Why would it? This is SQL standard behavior that should

Re: [GENERAL] ERROR: cache lookup failed for relation 438095645

2005-07-06 Thread Joe Markwardt
On Wed, 2005-07-06 at 14:04 -0400, Tom Lane wrote: > Joe Markwardt <[EMAIL PROTECTED]> writes: > >>> I am getting this error "ERROR: cache lookup failed for relation > >>> 438095645" when i try to run "drop table > >>> pl_inventory_analyzer_files_table ;" from psql on the database server. > >> >

Re: [GENERAL] current_user inside SECURITY DEFINER function?

2005-07-06 Thread Peter Eisentraut
Stephen Frost wrote: > * Richard Hayward ([EMAIL PROTECTED]) wrote: > > Is there any way of getting the user? > > You might try session_user. 8.1 will hopefully clean this up some. Why would it? This is SQL standard behavior that should not be changed. -- Peter Eisentraut http://developer.post

Re: [GENERAL] 7.3.2 closing connections, sometimes

2005-07-06 Thread felix
On Wed, Jul 06, 2005 at 03:10:40PM -0400, Tom Lane wrote: > > [EMAIL PROTECTED] wrote: > >> This is a SOAP server, Apache with mod_perl, connecting to Postgres > >> via DBI/DBD::Pg. Sometimes it gets in a mood, for want of a better > >> term, where a specific SQL statement fails with the good ole

Re: [GENERAL] 7.3.2 closing connections, sometimes

2005-07-06 Thread felix
On Wed, Jul 06, 2005 at 02:32:31PM -0400, Bruce Momjian wrote: > > This message is from the backend exiting abruptly. Is isn't an "ERROR" > as we define it for logging purposes. That's why there is nothing in > the logs. I recommend turning on log_statement which prints before the > query is ru

Re: [GENERAL] Scripting Functions to Separate Files

2005-07-06 Thread Tino Wildenhain
Am Mittwoch, den 06.07.2005, 11:35 -0700 schrieb Mike Fahrenkrog: > Hi, > Does anyone know an efficient way to script database objects > (preferably all objects, but particularly functions) to separate > files? I would like to have a separate file for each object, so that I > can easily add them t

Re: [GENERAL] 7.3.2 closing connections, sometimes

2005-07-06 Thread Tom Lane
> [EMAIL PROTECTED] wrote: >> This is a SOAP server, Apache with mod_perl, connecting to Postgres >> via DBI/DBD::Pg. Sometimes it gets in a mood, for want of a better >> term, where a specific SQL statement fails with the good ole message >> "server closed the connection unexpectedly". It will f

Re: [GENERAL] Transaction id wraparound questions

2005-07-06 Thread Tom Lane
Marc Munro <[EMAIL PROTECTED]> writes: > A recent vacuum of the entire database gave us the dreaded > "You may have already suffered transaction-wraparound data loss." > warning. If you have in fact been vacuuming *every* table including all the system catalogs, then you don't need to panic; this

[GENERAL] Transaction id wraparound questions

2005-07-06 Thread Marc Munro
It seems that we have not been vacuuming our production database properly. We have been explicitly vacuuming all tables individually but have not vacuumed the entire database. A recent vacuum of the entire database gave us the dreaded "You may have already suffered transaction-wraparound data lo

[GENERAL] Scripting Functions to Separate Files

2005-07-06 Thread Mike Fahrenkrog
Title: Scripting Functions to Separate Files Hi, Does anyone know an efficient way to script database objects (preferably all objects, but particularly functions) to separate files? I would like to have a separate file for each object, so that I can easily add them to source control. Thank

Re: [GENERAL] 7.3.2 closing connections, sometimes

2005-07-06 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: > I hate to post as vague a description as this, but I don't think the > devil is in the details this time. I may be wrong ... > > This project is running 7.3.2 on a RedHat 9 system. We plan to > upgrade in a few weeks to Fedora Core and Postgres 8, so maybe this > probl

[GENERAL] 7.3.2 closing connections, sometimes

2005-07-06 Thread felix
I hate to post as vague a description as this, but I don't think the devil is in the details this time. I may be wrong ... This project is running 7.3.2 on a RedHat 9 system. We plan to upgrade in a few weeks to Fedora Core and Postgres 8, so maybe this problem is not worth wasting too much time

Re: [GENERAL] ERROR: cache lookup failed for relation 438095645

2005-07-06 Thread Tom Lane
Joe Markwardt <[EMAIL PROTECTED]> writes: >>> I am getting this error "ERROR: cache lookup failed for relation >>> 438095645" when i try to run "drop table >>> pl_inventory_analyzer_files_table ;" from psql on the database server. >> >> Look through the system catalogs to see where that OID appea

Re: [GENERAL] ERROR: cache lookup failed for relation 438095645

2005-07-06 Thread Joe Markwardt
On Wed, 2005-07-06 at 11:20 -0400, Tom Lane wrote: > Joe Markwardt <[EMAIL PROTECTED]> writes: > > I am getting this error "ERROR: cache lookup failed for relation > > 438095645" when i try to run "drop table > > pl_inventory_analyzer_files_table ;" from psql on the database server. > > Look

Re: [GENERAL] Pl/PgsSQL array

2005-07-06 Thread Ben-Nes Yonatan
Richard Huxton wrote: Ben-Nes Yonatan wrote: Hi all, Can anyone tell me if Pl/PgSQL can support a multi dimensional array (of up to 5 levels top I guess) with about 100,000 values? and does it stress the system too much? I can't imagine it being wonderful - you probably want a different

Re: [GENERAL] Pl/PgsSQL array

2005-07-06 Thread Richard Huxton
Ben-Nes Yonatan wrote: Hi all, Can anyone tell me if Pl/PgSQL can support a multi dimensional array (of up to 5 levels top I guess) with about 100,000 values? and does it stress the system too much? I can't imagine it being wonderful - you probably want a different procedural language. Or a

Re: [GENERAL] Custom C function shutdown-signaling

2005-07-06 Thread Otto Blomqvist
Once again Tom comes threw and saves the day...! Thanks Tom ! /Otto Blomqvist "Tom Lane" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Otto Blomqvist" <[EMAIL PROTECTED]> writes: > > How do I signal a custom C function that the Postmaster wants to shut down ? > > Do "CHECK_FOR

Re: [GENERAL] ERROR: cache lookup failed for relation 438095645

2005-07-06 Thread Tom Lane
Joe Markwardt <[EMAIL PROTECTED]> writes: > I am getting this error "ERROR: cache lookup failed for relation > 438095645" when i try to run "drop table > pl_inventory_analyzer_files_table ;" from psql on the database server. Look through the system catalogs to see where that OID appears. pg

[GENERAL] ERROR: cache lookup failed for relation 438095645

2005-07-06 Thread Joe Markwardt
Hey list, I am getting this error "ERROR: cache lookup failed for relation 438095645" when i try to run "drop table pl_inventory_analyzer_files_table ;" from psql on the database server. I've already REINDEX'd the database system tables, and all the indexes on that table, and on all the in

Re: [GENERAL] Seg fault in postgres 7.4.7?

2005-07-06 Thread Alvaro Herrera
On Tue, Jul 05, 2005 at 09:58:12PM -0700, Akash Garg wrote: > My postgres 7.4.7 installation crashed on its own today -- here is the > error log: > > ERROR: duplicate key violates unique constraint "toolbar_pkey" > LOG: server process (PID 22753) was terminated by signal 11 > LOG: terminating a

Re: [GENERAL] current_user inside SECURITY DEFINER function?

2005-07-06 Thread Adam Witney
I think you want to use session_user instead Adam > Is there any way to get the name of the current user inside a PL/pgSQL > function that is defined with security definer? > > current_user gives the name of the user who created the function. > > The reason I want this is that I intend to use

Re: [GENERAL] current_user inside SECURITY DEFINER function?

2005-07-06 Thread Stephan Szabo
On Tue, 5 Jul 2005, Richard Hayward wrote: > Is there any way to get the name of the current user inside a PL/pgSQL > function that is defined with security definer? IIRC, SESSION_USER should give the original user. ---(end of broadcast)--- TIP 9:

Re: [GENERAL] current_user inside SECURITY DEFINER function?

2005-07-06 Thread Stephen Frost
* Richard Hayward ([EMAIL PROTECTED]) wrote: > Is there any way of getting the user? You might try session_user. 8.1 will hopefully clean this up some. Thanks, Stephen signature.asc Description: Digital signature

Re: [GENERAL] Seg fault in postgres 7.4.7?

2005-07-06 Thread Michael Fuhr
On Wed, Jul 06, 2005 at 09:20:34AM +0100, Richard Huxton wrote: > > Can't see anything there, so if it's a bug in the 7.4 series, you're the > first to discover it. There might be something unusual about your > installation. Can you give details (did you install from source/package, > what OS,

[GENERAL] Pl/PgsSQL array

2005-07-06 Thread Ben-Nes Yonatan
Hi all, Can anyone tell me if Pl/PgSQL can support a multi dimensional array (of up to 5 levels top I guess) with about 100,000 values? and does it stress the system too much? Thanks! Ben-Nes Yonatan Canaan Surfing ltd. ---(end of broadcast)---

Re: [GENERAL] PostgreSQL sequence within function

2005-07-06 Thread Clark Allan
I figured it out... the problem was calling nextval("seq") with double quotes.   Normally, you would do "select nextval('seq')".  From within a function, calling nextval with single quotes around the argument, causes a syntax error.   SOLUTION: you need to use "backslash escape" sequences around th

Re: [GENERAL] template1 problems

2005-07-06 Thread Patrick . FICHE
Tom Lane recently pointed one excellent article dealing with this problem... http://techdocs.postgresql.org/techdocs/pgsqladventuresep1.php Regards, Patrick --- Patrick Fiche email : [EMAIL PROTECTED] tél

[GENERAL] current_user inside SECURITY DEFINER function?

2005-07-06 Thread Richard Hayward
Is there any way to get the name of the current user inside a PL/pgSQL function that is defined with security definer? current_user gives the name of the user who created the function. The reason I want this is that I intend to use functions to maintain security, like this: userA has only selec

[GENERAL] suggestion for diagnostics (errors)

2005-07-06 Thread Nikolay Samokhvalov
Consider following SQL: ** select femail, min(fid) AS main_id, count(fid) AS countids from users where count(fid) > 1 group by femail ** Of course, postgreSQL produce error for such wrong statement: SQL error: ERROR: aggregates not allowed in WHERE clause I think it would be much better if DBMS

Re: [GENERAL] PostgreSQL sequence within function

2005-07-06 Thread Clark Allan
Thanks for the help Tony, But im still having some trouble.   Here is the exact function --- CREATE OR REPLACE FUNCTION sp_slide_create(int4, bool, bool, bool, varchar, text, varchar, varchar, int4)RETURNS int4 AS'DECLARE aScriptID ALIAS FOR $1; aAllowDGP ALI

[GENERAL] template1 problems

2005-07-06 Thread Sim Zacks
Postgresql 8.0 Linux. using PGAdmin III 1.2 client I accidentally did a restore of my database into template1. I thought the best way to reverse it would be to drop the database and make a new one with template0 as the template. But it didn't like that because template1 is a system database so I c

Re: [GENERAL] double entries into database when using IE

2005-07-06 Thread D A GERM
Thank you all. I changed the type to button and added the onClick="return(myFunction())". I did some tests this morning and the double posts seem to stop. The duplicate entries were a thousandth to a ten thousandth off in the time stamp, but now there's only the one entry as should be. Than

Re: [GENERAL] Seg fault in postgres 7.4.7?

2005-07-06 Thread Richard Huxton
Akash Garg wrote: My postgres 7.4.7 installation crashed on its own today -- here is the error log: ERROR: duplicate key violates unique constraint "toolbar_pkey" LOG: server process (PID 22753) was terminated by signal 11 LOG: terminating any other active server processes WARNING: terminati