Re: [GENERAL] In processing DDL, when does pg_catalog get updated?

2005-12-29 Thread Tom Lane
"Ken Winter" <[EMAIL PROTECTED]> writes: > Is it possible that the pg_catalog is not updated with the results of a DDL > script until the whole script has executed? No, the serial sequence should exist as soon as the CREATE TABLE is done ... unless you are doing something weird like wrapping the w

[GENERAL] In processing DDL, when does pg_catalog get updated?

2005-12-29 Thread Ken Winter
I'm running a DDL script that does the following (in this order): 1. Creates a table containing a BIGSERIAL primary key column declaration, which apparently automatically creates a sequence to populate this column. 2. Runs a "gen_sequences" function that I wrote, which executes CREATE SEQUENCE st

Re: [GENERAL] Simple Accumulating Number Loop?

2005-12-29 Thread Bricklen Anderson
Ubence Quevedo wrote: A friend of mine has created this simple accumulating loop query for MS SQL 2k5 Express Edition. I am trying to reproduce the same results with PostgreSQL 8.1, but am not able to find much useful help on how to properly set up a variable of both int and char. The PostgreSQ

[GENERAL] Simple Accumulating Number Loop?

2005-12-29 Thread Ubence Quevedo
A friend of mine has created this simple accumulating loop query for MS SQL 2k5 Express Edition. I am trying to reproduce the same results with PostgreSQL 8.1, but am not able to find much useful help on how to properly set up a variable of both int and char. The PostgreSQL documentation is great

Re: [GENERAL] Queries never returning...

2005-12-29 Thread John McCawley
It looks like my primary slowdown on that query was the timestamp trigger. However, even after removing that trigger, and ensuring that all of my referencing tables had their foreign keys indexed, a simple update of one column on 244451 records took 14 minutes. Given the specs I mentioned in

Re: [GENERAL] Stored Procedure: PL/Perl or PL/SQL?

2005-12-29 Thread Sean Davis
On 12/29/05 4:10 PM, "Joshua Kramer" <[EMAIL PROTECTED]> wrote: > > Greetings all, > > I'm working to integrate an accounting system > (http://www.linuxcanada.com) with another application. Fortunately, > both use PG, so integration should be easy. > > I want to be able to insert invoices,

Re: [GENERAL] another problem with stored procedures

2005-12-29 Thread Stephan Szabo
On Thu, 29 Dec 2005, Ted Byers wrote: > I have just encountered another problem. I am not sure if it is with my > code, or with how I am working with Postgres/pgAdmin III. > > Here is another function, as created using the wizard/dialog box in pgAmin > III for creating functions: > > CREATE FUNC

[GENERAL] another problem with stored procedures

2005-12-29 Thread Ted Byers
I have just encountered another problem.  I am not sure if it is with my code, or with how I am working with Postgres/pgAdmin III.Here is another function, as created using the wizard/dialog box in pgAmin III for creating functions:CREATE FUNCTION "People".get_pw(ea "varchar") RETURNS "varc

Re: [GENERAL] Triggers and Audit Trail

2005-12-29 Thread Eric E
Hi Marcus, Marcus Couto wrote: Hi all. I'm new with PostgreSQL and this is my first post, so easy on me... :)   I'm thinking of using the native procedural language and triggers to keep an audit trail. For editing changes, we only keep a log of the modified fields and we create

Re: [GENERAL] alter column datatype with cast

2005-12-29 Thread Michael Fuhr
On Thu, Dec 29, 2005 at 09:46:10PM +0100, Klein Balzs wrote: > I had to change the datatype of a column from text to integer. The column > contained integers (obviously stored as text). > > When I tried to change the datatype of the column I got an error message > saying that the column can not be

[GENERAL] Stored Procedure: PL/Perl or PL/SQL?

2005-12-29 Thread Joshua Kramer
Greetings all, I'm working to integrate an accounting system (http://www.linuxcanada.com) with another application. Fortunately, both use PG, so integration should be easy. I want to be able to insert invoices, and invoice line items, into the accounting system. As you might expect, this requi

[GENERAL] alter column datatype with cast

2005-12-29 Thread Klein Balázs
I had to change the datatype of a column from text to integer. The column contained integers (obviously stored as text). When I tried to change the datatype of the column I got an error message saying that the column can not be cast to integer: Operation : ALTER TABLE "public"."subjectgroupcondit

Re: [Bulk] Re: [GENERAL] Final stored procedure question, for now anyway

2005-12-29 Thread Guy Rouillier
Ted Byers wrote: > > 2) Do I need to qualify my references to my tables in the function to > identify the schema in which the tables exist, or will Postgres find > the right tables with the function in its present form? If I have to > further qualify the table references, what is the correct > q

Re: [GENERAL] windows xp install problem ("failed to set

2005-12-29 Thread Raymond O'Donnell
On 27 Dec 2005 at 17:04, George Pavlov wrote: > Any ideas on what to look for. Any special permissions I need to set > outside of the install or before the install? Just looking at my own XP installation, the Postgres data directory (C:\Program Files\PostgreSQL\8.0\data on my system) has "modif

Re: [GENERAL] how to add a new column to system table

2005-12-29 Thread Qingqing Zhou
""xiapw"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I wanted to add a new column to system table(pg_database),but failed at >last. Who know how to do this and can you tell me ? A recent change to pg_database (adding a new column) happened on -- Sun Jul 31 17:19:21 2005 UTC (

Re: [GENERAL] Triggers and Audit Trail

2005-12-29 Thread Michael Fuhr
On Thu, Dec 29, 2005 at 11:44:26AM -0600, Jeff Amiel wrote: > >Using triggers, is there a way to loop through the fields of the OLD > >and NEW records? I haven't found a generic way to get the field name > >and value that triggered the update other than hard coding if > >statements to compare ev

Re: [GENERAL] Triggers and Audit Trail

2005-12-29 Thread Jeff Amiel
We (my company) never found a way. We ended up writing java code that analyzed the catalog tables that generated the appropriate 'if' statements in the trigger functions for us Actuallywe tinkered with hitting the catalog tables inside our triggers, but for performance reasons, we

Re: [GENERAL] Triggers and Audit Trail

2005-12-29 Thread Jeff Amiel
Using triggers, is there a way to loop through the fields of the OLD and NEW records? I haven't found a generic way to get the field name and value that triggered the update other than hard coding if statements to compare every field of the OLD and NEW records. We (my company) never found a

Re: [GENERAL] new beginner to postgresql. Looking at it for a church

2005-12-29 Thread John DeSoi
On Dec 27, 2005, at 7:31 PM, Pamela wrote: I was wondering if anyone has setup a point-of-sale system with postgresql. Also, I will have to create a database for a church that requires lots of tables and subcategories. They have 4 different locations and wish to be interconnected amongst

[GENERAL] Triggers and Audit Trail

2005-12-29 Thread Marcus Couto
Hi all. I'm new with PostgreSQL and this is my first post, so easy on me... :)   I'm thinking of using the native procedural language and triggers to keep an audit trail. For editing changes, we only keep a log of the modified fields and we create a record for each modified value. The audit

Re: [GENERAL] I want to know how to improve the security of postgresql

2005-12-29 Thread Marc Munro
Sting, I'm not entirely sure what you mean by improving the security of postgresql but if you want to implement smart, efficient row-level security you could take a look at Veil http://pgfoundry.org/projects/veil/ Check the project home page for documentation. Veil is still an alpha release but I

Re: [GENERAL] POstgreSQL 8.1.X/Lazarus?

2005-12-29 Thread Tony Caduto
Are you running Lazarus on win32 or Linux?(I assume win32 because you mentioned a dll) I have successfully used Zeos with Delphi against a 8.1 server, I even used the libpq74.dll that ships with zeos. I guess you should make sure any versions of libpq you have are in your system32 dir. Win

Re: [GENERAL] how to add a new column to system table

2005-12-29 Thread Bruce Momjian
xiapw wrote: > I wanted to add a new column to system table(pg_database),but failed > at last. Who know how to do this and can you tell me ? It is pretty complicated. I would pick an existing column in the table and find all references to that in the backend, then adjust other values to match.

Re: [GENERAL] I want to know how to improve the security of postgresql

2005-12-29 Thread Christopher Browne
> Hi guys,can you give me some advices about how to improve the > security of postgresql? > > Now I major in the security of postgresql and the destination is > create a database with security level of B1(TCSEC),what should I do > now,what program language should I use? Well, since PostgreSQL is i

Re: [GENERAL] Is CREATE TYPE an alias for CREATE DOMAIN?

2005-12-29 Thread John Dean
Hi Jim I have checked through the docs for:- 1. Interbase/Firebird 2. Sybase/MS SQL Server 3. Oracle 4. DB2 5. PostgreSQL BTW I didn't bother to check the MySQL docs because I do not consider MySQL to be a RDBMS It seems that only Interbase/Firebird and PostgreSQL supports the CREATE DOMAIN s

Re: [GENERAL] WAL logs multiplexing?

2005-12-29 Thread Simon Riggs
On Thu, 2005-12-29 at 10:47 +0300, Dmitry Panov wrote: > On Wed, 2005-12-28 at 11:05 -0500, Tom Lane wrote: > > Dmitry Panov <[EMAIL PROTECTED]> writes: > > > Yes, but if the server has crashed earlier the script won't be called > > > and if the filesystem can't be recovered the changes will be los

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, some

[GENERAL] POstgreSQL 8.1.X/Lazarus?

2005-12-29 Thread Zlatko Matić
Hello.   Is there anybody using lazarus with new POstgreSQL 8.1.X ? I couldn't connect using Zeos, because it seems zeos work only with old versions of PostgreSQL. Also, I couldn't connect by using TPSQL, because it can't find libpg.dll installed (?)...   Regards,   Zlatko

Re: [GENERAL] a few questions

2005-12-29 Thread Martijn van Oosterhout
On Thu, Dec 29, 2005 at 03:40:11PM +0530, surabhi.ahuja wrote: > pidof of doesnt work ? Given the number of processes is going to be at least 3+number of connections, how is pidof going to know which one you mean? Answer: it doesn't, so you end up killing a random one. > which startup script are

Re: [GENERAL] a few questions

2005-12-29 Thread Martijn van Oosterhout
On Thu, Dec 29, 2005 at 03:09:52PM +0530, surabhi.ahuja wrote: > I have a few questions: > 1. what is pg_xlog > someone told me that i can move pg_xlog to a different parttion in order to > boost the performance? Does it work and how Yes, it works. How? By moving the directory (while the postmas

[GENERAL] a few questions

2005-12-29 Thread surabhi.ahuja
 I have a few questions: 1. what is pg_xlog someone told me that i can move pg_xlog to a different parttion in order to boost the performance? Does it work and how     2. there is a parameter in postgresql.conf called max_connections. which is 100 be default. i want o decrease it to 20. by doin

[GENERAL] how to add a new column to system table

2005-12-29 Thread xiapw
I wanted to add a new column to system table(pg_database),but failed at last. Who know how to do this and can you tell me ?

Re: [GENERAL] DB crash after disk full

2005-12-29 Thread Vilen Tambovtsev
Version 8.1.1 Got to make it work, after deletin some records from table Tom Lane wrote: Vilen Tambovtsev <[EMAIL PROTECTED]> writes: - 2005-12-28 19:02:49 NOVT - - 2747: PANIC: could not access status of transaction 74678708 What Postgres version is this? regard