Re: [ADMIN] Change in behavior of string concat operator

2008-12-08 Thread Stephan Szabo
On Mon, 8 Dec 2008, Benjamin Krajmalnik wrote: Thanks. Then we have an inconsistency between this and the documentation for the || operator, where it is showing the abilty to concat numeric types without explicit casting. http://www.postgresql.org/docs/8.3/static/functions-string.html

Re: [ADMIN] pg_tables query issue

2008-06-30 Thread Stephan Szabo
I've found that if I run this select (below) I get a table returned named 'dma' een though I specified like 'dm_%' : Underscore is a special character for like matching any single character so I don't think that's wrong. -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To

Re: [ADMIN] Deferred Constraints Issues

2008-03-25 Thread Stephan Szabo
On Tue, 25 Mar 2008, kevin kempter wrote: I've placed this sql in a script: psql my_db ! begin; SET CONSTRAINTS ALL DEFERRED ; delete from account where 1 = 1; delete from cust where 1 = 1; delete from cust_type where 1 = 1; delete from cust_orders where 1 = 1; commit; ! The tables

Re: [ADMIN] pg_catalog.pg_roles DESTROYED?

2007-08-02 Thread Stephan Szabo
On Thu, 2 Aug 2007, Ralph Smith wrote: I'm preparing to upgrade a 7.4.7 DB to 8.2.4. I just got connectivity from new to old (different hosts), and being a newhire and no-one had ever done any maintenance on the old DB, I connected as joe-user to the old DB using the client of the new.

Re: [ADMIN] trigger and pg_fini

2007-07-28 Thread Stephan Szabo
On Sat, 28 Jul 2007, De Leeuw Guy wrote: Hello Stephan Thanks for you respons. Stephan Szabo a ?crit : _PG_fini is called when the file is unloaded, but not at process end, according to the documentation, so I don't think it does what you want. No, I make a small test : In _PG_fini I

Re: [ADMIN] trigger and pg_fini

2007-07-27 Thread Stephan Szabo
On Fri, 27 Jul 2007, De Leeuw Guy wrote: I make a lot of tests with trigger and first problem the function _PG_fini are never called it is a bug ?. _PG_fini is called when the file is unloaded, but not at process end, according to the documentation, so I don't think it does what you want.

Re: [ADMIN] Another question in functions

2007-04-09 Thread Stephan Szabo
On Sun, 8 Apr 2007, Karthikeyan Sundaram wrote: Hi team, I have a requirement like this. create table valid_lovs (code_id int not null,lov_value int not null ,description varchar(256),status bit(1) not null default '1',constraint lov_pk primary key (code_id,lov_value)); I need to

Re: [ADMIN] Error in trigger

2007-01-18 Thread Stephan Szabo
On Thu, 18 Jan 2007, Negandhi, Nishith wrote: Hi, All my tables in the database have CreateDate and LastUpdateDate columns. I need to create a trigger wherein on insert the CreateDate column is inserted with the current date. On Update the LastUpdateDate is inserted with the current date.

Re: [ADMIN] Function ERRO after UPGRADE from 7.4 to 8.1.5

2006-11-24 Thread Stephan Szabo
On Fri, 24 Nov 2006, Marcelo Costa wrote: Hi, all I migrate my database from 7.4 to 8.1.5 and make tests with aplication but this don´t works fine. Some trigers don´t work and send to me error messages as this: Warning: pg_query(): Query failed: ERROR: INSERT is not allowed in a

Re: [ADMIN] Circular Dependency in Tables and Deletion of Data

2006-07-24 Thread Stephan Szabo
On Mon, 24 Jul 2006, Mans wrote: Hello, Note: I know that its not a very good db design. But what if a senario comes in front of you? I have created an uncommon database design. Which is as follows: Created 2 Tables :- Emp1 and Emp2 TableA with 2 Attributes A1 and A2. A1 is the

Re: [ADMIN] 8.1 Unique Index Issue/Bug???

2006-07-13 Thread Stephan Szabo
On Thu, 13 Jul 2006, Chris Hoover wrote: I am having what appears to be a bug with unique indexes on 8.1.3. I have created a new table. create table payer_835 ( payer_id int8 not null default nextval('payer_835_payer_id_seq'::regclass) primary key, payer_name

Re: FW: [ADMIN] reset all sequences

2006-05-09 Thread Stephan Szabo
On Tue, 9 May 2006, Pascal Tufenkji wrote: How can I reset the sequence to 1 If I use the following statement Select setval('mytable_id_seq',1); I put the last value as 1 So when I insert a new row the value will be 2 and not 1 as it should be I cannot put Select

Re: [ADMIN] Different results when specifying DEFAULT values through

2006-04-19 Thread Stephan Szabo
On Wed, 19 Apr 2006, Thusitha Kodikara wrote: Hi, I observed the following on PostgreSQL 8.1.3 (on Windows 2000). (1) alter table invoice add column active boolean default true; This will add a new column active with a default clause as true and also sets the value true to all existing

Re: [ADMIN] OT: using column in an interval

2006-03-24 Thread Stephan Szabo
On Thu, 23 Mar 2006, Bradley Kieser wrote: All, I know that this isn't strictly an admin question but please forgive me for asking. I am writing a (admin) job which does a select off a PG database based on three columns: last_backup: timestamp backup_unit: integer - Represents day,

Re: [ADMIN] pg_hba.conf + all + trust = Ident authentication failed

2006-03-06 Thread Stephan Szabo
On Mon, 6 Mar 2006, ow wrote: PostgreSQL 8.1.0 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.0.3 2005 (prerelease) (Debian 4.0.2-4) Hi, Can't get pg_hba.conf with trust to work: [EMAIL PROTECTED]:~$ psql -U postgres psql: FATAL: Ident authentication failed for user postgres

Re: [ADMIN] [pgsql-admin] Simple question about security in 8.1.1

2006-01-22 Thread Stephan Szabo
On Sun, 22 Jan 2006, Dan Bikle wrote: I'm allowed to connect to the db10 database without authentication!: bash-2.05b$ psql db10 scott Welcome to psql 8.1.1, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for

Re: [ADMIN] single click, double query

2005-12-15 Thread Stephan Szabo
On Thu, 15 Dec 2005, Szabolcs BALLA wrote: Hi, I have a strange problem with psql 7.4.7. I have customers who run xp, with sp1 (with sp2 no problem), when they report from our web-based application they send a query after a single click. The same queries have been posted twice within a few

Re: [ADMIN] UNIQUE KEY with null value...

2005-11-01 Thread Stephan Szabo
On Tue, 1 Nov 2005, Diego wrote: Hi, I´m a brazilian programmer! I have a question about Postgres UNIQUE KEY. Look: (Step 1) CREATE TABLE test ( id integer not null primary key, id_uni integer not null, cod integer, name varchar(40), constraint test_uk unique(id_uni, cod) ) (Step

Re: [ADMIN] triggers

2005-09-08 Thread Stephan Szabo
On Thu, 8 Sep 2005, Kailash Vyas wrote: hi I have a query regarding triggers. On INSERT, UPDATE, DELETE I want to fire a trigger to relect it to another database on postgres sever. how can I do this operation. This is tricky, because you probably want to have the same transactional

Re: [ADMIN] outer joins

2005-08-05 Thread Stephan Szabo
On Fri, 5 Aug 2005, D Kavan wrote: Hi, Thanks for the reply. That didn't help him, but he asked me to post this. There are 66 project id's in the project table and 3 rows in the project_members table for global_id 2915, but it only returns 3. I would think it should return 66 rows, with

Re: [ADMIN] LOOP and EXIT

2005-07-14 Thread Stephan Szabo
On Tue, 12 Jul 2005, [iso-8859-1] Sebastian Kühner wrote: Hello, I'm new here in this group... and I hope that I find the solution for my problem here. I wrote a simple function which looks like this: CREATE OR REPLACE FUNCTION watchdog() RETURNS TIME AS ' DECLARE watchdog_control

Re: [ADMIN] Problem in order by

2005-04-12 Thread Stephan Szabo
On Mon, 11 Apr 2005, [iso-8859-1] Reuly Bússolo Mendes wrote: Hi Stephan, tks I drop database and move directory data to data01. I already executed initdb --locale=C and the file postgresql.conf change to LC_MESSAGES, LC_MONETARY, LC_NUMERIC and LC_TIME = 'C', but the problem persist. I

Re: [ADMIN] Problem in order by

2005-04-12 Thread Stephan Szabo
On Tue, 12 Apr 2005, [iso-8859-1] Reuly Bússolo Mendes wrote: The command's return teste=# show LC_COLLATE; ERROR: Option 'lc_collate' is not recognized Darn, that must have been added after 7.3.x. If you have pg_controldata, I think you can use pg_controldata path to data directory. I

Re: [ADMIN] Problem in order by

2005-04-12 Thread Stephan Szabo
On Tue, 12 Apr 2005, Stephan Szabo wrote: On Tue, 12 Apr 2005, [iso-8859-1] Reuly Bússolo Mendes wrote: The command's return teste=# show LC_COLLATE; ERROR: Option 'lc_collate' is not recognized Darn, that must have been added after 7.3.x. If you have pg_controldata, I think you can

Re: [ADMIN] Problem in order by

2005-04-11 Thread Stephan Szabo
On Mon, 11 Apr 2005, [iso-8859-1] Reuly Bússolo Mendes wrote: In the Cygwin, the return is correct: prodes TELHA FRANCESA CAMBORIU TELHA PORTUGUESA SAO CRISTOVAO TELHA ROMANA LEONEL PEREIRA TELHA TRANSPARENTE

Re: [ADMIN] ERROR: for SELECT DISTINCT, ORDER BY expressions must

2005-03-14 Thread Stephan Szabo
On Mon, 14 Mar 2005, Gourish Singbal wrote: The Query needs to have the distinct clause in the select statement and the UPPER clause in the order by clause. eg. select distinct id, type from user_list order by UPPER(type) Please let me know if there is any solution to this issue thanks in

Re: [ADMIN] postgresql 7.4.6 - FATAL Database Startup Message

2005-01-24 Thread Stephan Szabo
On Fri, 21 Jan 2005, Rao Kumar wrote: Database System startup message In postgres version 7.4.6, I notice that sometimes when the database starts up, it outputs a log message such as 2005-01-18 14:44:13 FATAL: the database system is starting up. Shouldn't this be LOG instead of FATAL

Re: [ADMIN] Installing PostgreSQL as postgress versus root

2005-01-12 Thread Stephan Szabo
On Wed, 12 Jan 2005, Goulet, Dick wrote: You may well be on the development team, but you are wrong for one very important reason. If the Postgresql executables are owned by root they execute with the priviledges of root. Thereby any local Not on any reasonable system unless

Re: [ADMIN] Rules on a view overwrite default values. Any way to

2005-01-03 Thread Stephan Szabo
On Mon, 3 Jan 2005, Bradley Kieser wrote: Hi, I use views extensively to implement security on tables. This requires each table to have a view. All updates, inserts and deletes take place through the view. The view has rules for each of these operations defining security for that table.

Re: [ADMIN] Bad Timestamp Error with COPY

2004-11-10 Thread Stephan Szabo
On Wed, 10 Nov 2004, Sharon Schooley wrote: I am new to Postgresql. I'm trying to load tables from SQLServer bcp export, comma delimited. I'm loading datetime datatype into timestamp. I've loaded one table successfully and failed on others with the same error: Bad timestamp external

Re: [ADMIN] pulling my hair out..

2004-11-04 Thread Stephan Szabo
On Thu, 4 Nov 2004, David Bear wrote: I'm using pg 7.3 on freebsd.. I've created a database use sql. now, as the pg superuser I cant seem to grant any permissions on the tables in the db.. npcenter-# \z Access privileges for database npcenter Schema |Table | Access privileges

Re: [ADMIN] pg_dump doesn't save correct the sequences

2004-10-28 Thread Stephan Szabo
On Thu, 28 Oct 2004, Andrei Bintintan wrote: I try to dump a database from a 7.4.2 postgre system and to import it on a 7.3.2. system, but I have a problem with the sequences in the dump. In general, the above is not guaranteed to work. pg_dump will use features of the dumping version so

Re: [ADMIN] REVOKE not working...

2004-10-22 Thread Stephan Szabo
On Fri, 22 Oct 2004, Joe Maldonado wrote: Scott Marlowe wrote: On Thu, 2004-10-21 at 10:49, Joe Maldonado wrote: Scott Marlowe wrote: On Wed, 2004-10-20 at 08:17, Joe Maldonado wrote: Hello all, I have created users for which I have restricted access to SELECT

Re: [ADMIN] pgsql database .1 .2 .3 file names

2004-10-19 Thread Stephan Szabo
On Tue, 19 Oct 2004, Bryan Biggers wrote: Can anyone tell me what the data file names with the .1 .2 .3 etc. extensions are? Are these undo versions of my tables or something? I need to recover some disk space and I'm wondering if I need them. Here is an example... -rw---1 postgres

Re: [ADMIN] PLEASE GOD HELP US!

2004-10-02 Thread Stephan Szabo
On Fri, 1 Oct 2004, Scott Marlowe wrote: On Fri, 2004-10-01 at 14:26, Shane | SkinnyCorp wrote: Okay, just so no one posts about this again... the 'ORDER BY t.status=5,lastreply' clause is meant to float the threads with a status of '5' to the top of the list... it is NOT meant to only

Re: [ADMIN] PLEASE GOD HELP US!

2004-10-02 Thread Stephan Szabo
On Sat, 2 Oct 2004, Scott Marlowe wrote: On Sat, 2004-10-02 at 09:14, Stephan Szabo wrote: On Fri, 1 Oct 2004, Scott Marlowe wrote: On Fri, 2004-10-01 at 14:26, Shane | SkinnyCorp wrote: Okay, just so no one posts about this again... the 'ORDER BY t.status=5,lastreply' clause

Re: [ADMIN] grant command: wildcard on tables?

2004-10-01 Thread Stephan Szabo
On Thu, 30 Sep 2004, Duane Winner wrote: Hello, We have a database with data loaded and now I need to GRANT SELECT,UPDATE,INSERT,DELETE to all tables in 4 different schemas for a specific postgresql user account. I have two problems: 1) One of these schemas has 75 tables. Is there a way

Re: [ADMIN] PLEASE GOD HELP US!

2004-10-01 Thread Stephan Szabo
On Fri, 1 Oct 2004, Michael Paesold wrote: Shane | SkinnyCorp wrote: Okay, just so no one posts about this again... the 'ORDER BY t.status=5,lastreply' clause is meant to float the threads with a status of '5' to the top of the list... it is NOT meant to only grab threads where the

Re: [ADMIN] unique constraints on foreign keys

2004-09-20 Thread Stephan Szabo
On Mon, 20 Sep 2004, Jaime Casanova wrote: I have a reference table that holds all the status used in a system (it's a very little table just 10 or 15 rows). create table status ( cod_status char(2) not null primary key, nam_status textnot null ); create table

Re: [ADMIN] TOAST tables keeps growing!

2004-08-13 Thread Stephan Szabo
On Thu, 12 Aug 2004, Thomas Madsen wrote: I'm running a production server with PostgreSQL version 7.2.1, that does You really should upgrade. If not to 7.4.x, at least to the last 7.2 release. The problem is that TOAST tables keeps springing forth and consume disk space. We do a VACUUM

Re: [ADMIN] inheritance question

2004-07-19 Thread Stephan Szabo
there for applications that were written for older versions of PostgreSQL. You probably should be using queries that use the ONLY keyword rather than relying on the guc variable. On Sun, 18 Jul 2004, Stephan Szabo wrote: On Tue, 13 Jul 2004, evgeny tsurkin wrote: Hi All! That probably

Re: [ADMIN] inheritance question

2004-07-18 Thread Stephan Szabo
On Tue, 13 Jul 2004, evgeny tsurkin wrote: Hi All! That probably was already asked thousand times but i did not find an exact answer: I want to have two tables the second one will have all the columns from the first + some extra .The data should be complittly separate .I was trying to use

Re: [ADMIN] Turning of case sensitivity for identifiers?

2004-07-14 Thread Stephan Szabo
On Wed, 14 Jul 2004, Joost Kraaijeveld wrote: Is it possible to turn of the case sensitivity for tables and columns in queries (to all CAPS)? I have a (closed source) tool that I have to use (Clarion) that generates the queries and I cannot change the way the tool generates the queries.

Re: [ADMIN] Strange scenary.

2004-07-08 Thread Stephan Szabo
On Sat, 3 Jul 2004, Guido Barosio wrote: Hi, This is the problem. I create a database from cero. I create a empty table, name students. I ask for an EXPLAIN on this new table, and the output of the query analyzer tells me that this table is filled with 1000 rows. So...why is

Re: [ADMIN] table column with special characters

2004-07-02 Thread Stephan Szabo
On Fri, 2 Jul 2004, Rahul k wrote: I need to query a table with column name having special characters :, @, /, for example: ab:cde12n/[EMAIL PROTECTED] You'd need to double quote the name on creation and on any usage of the name (for example in a select list or expression) in SQL statements.

Re: [ADMIN] Vacuum x Vacuum full

2004-06-25 Thread Stephan Szabo
On Fri, 25 Jun 2004, Carlos Benkendorf wrote: I would like to know if space disk is free to the Operational System during a standard vacuum (without the full option)? I found in section 21.1.1 Recovering disk space of Postgresql 7.4.2 manual something about it. The standard form of VACUUM

Re: [ADMIN] Continue with the original idea, about JOINS....

2004-06-25 Thread Stephan Szabo
On Fri, 25 Jun 2004, [iso-8859-1] Jhonatas M. Rodríguez wrote: Hey, i have a question about of the uses the joins in PostgreSQL. In SQL Server the joins i can use with the simbol(*), Example:. the right join is table1.field1 =* table2.field2 In Oracle the joins are with the simbol (+),

Re: [ADMIN] A question about Join?...

2004-06-23 Thread Stephan Szabo
On Wed, 23 Jun 2004, [iso-8859-1] Jhonatas M. Rodríguez wrote: Hello Everybody?... Hey, i have a question about of the uses the joins in PostgreSQL. In SQL Server the joins i can use with the simbol(*), Example:. the right join is field1=*field2 In Oracle the joins are with the

Re: [ADMIN] RHDB just sits and does nothing?

2004-06-09 Thread Stephan Szabo
On Wed, 9 Jun 2004, Mauri Sahlberg wrote: rahaks=# begin foo rahaks-# ; ERROR: parser: parse error at or near foo at character 7 rahaks=# begin; BEGIN rahaks=# set constraints all deferred; SET CONSTRAINTS In addition to the other messages, the above only defers deferrable constraints.

Re: Solution! (was: Re: [ADMIN] Linux (Debian Woody)...)

2004-06-08 Thread Stephan Szabo
On Fri, 27 Feb 2004, Phillip R. aka Qbert wrote: Am Mittwoch, 25. Februar 2004 16:49 schrieb Phillip R. aka Qbert: ... I figured it's a user problem, so I thought it might be a good idea to drop my test-db elefant-data, and try to create a new one, this time making shure it'd be with the

Re: [ADMIN] [SQL] rules

2004-05-19 Thread Stephan Szabo
On Wed, 19 May 2004, Jie Liang wrote: According to the document of rule: CREATE RULE rulename AS ON delete TO mytablename DO ( delete from aaa where id=OLD.id; Delete from bbb where id=OLD.id; Delete from ccc where id=OLD.id ); Should work, but it doesn't, what wrong with it? What is

Re: [ADMIN] Keep a user from creating tables ?

2004-05-17 Thread Stephan Szabo
On Mon, 17 May 2004, Gregory S. Williamson wrote: Stephan, Thanks for the info, but alas, no success. I have: List of database users User name | User ID | Attributes ---+-+ testuser | 100 | postgres | 1 |

Re: [ADMIN] cast not IMMUTABLE?

2004-05-08 Thread Stephan Szabo
On Fri, 7 May 2004, Gaetano Mendola wrote: Hi all, I have a table with ~ 3e+6 rows on it. I do select on this table in this way: (1) select * from user_logs where login_time::date = now()::date; consider that login_time is a TIMESTAMPTZ with an index on it. If I use the select in

Re: [ADMIN] delete cascade question

2004-04-27 Thread Stephan Szabo
On Tue, 27 Apr 2004, Glenn MacGregor wrote: Now I need to change the parentname field (in the case of vimid = 2) from [EMAIL PROTECTED] to test and keep the vimname field as is. When I do this the constraint no longer works (which makes perfect sense). 1 | [EMAIL PROTECTED] | cell | f |

Re: [Fwd: Re: [ADMIN] Location of a new column]

2004-04-08 Thread Stephan Szabo
On Thu, 8 Apr 2004, Terry Hampton wrote: Anyone know this list member, who was kind enought to reply? No, but he's sent me private messages of the sort in the past (and in fact also sent on in response to my reply to this message). Original Message Subject: Re:

Re: [ADMIN] [admin] index in pk

2004-04-07 Thread Stephan Szabo
On Wed, 7 Apr 2004, Jaime Casanova wrote: hi all, there is a way to use my own index with pk constraint instead of the implicitly created one? why? just because i don't like the name, maybe can i change the generated name? You should be able use the full version with the constraint naming

Re: [ADMIN] create function problem

2004-03-19 Thread Stephan Szabo
On Tue, 16 Mar 2004, Thomas Leung wrote: I want to index my table using the year of the date. So I create the following function. create function to_year(date) returns varchar as ' declare str varchar; begin str := to_char($1, ); return str; end; ' language 'plpgsql'

Re: [ADMIN] SOS ---- Could you help me with postgresql.....????

2004-03-19 Thread Stephan Szabo
On Thu, 18 Mar 2004 [EMAIL PROTECTED] wrote: Recently We Update our Postgresql database server by installing Postgresql 7.4.1, we followed the basic installation steps that appear in the install file, everything was fine till this morning when we realize that the partition (/var) where we

Re: [ADMIN] pgcrypto and database encryption

2004-03-08 Thread Stephan Szabo
On Mon, 8 Mar 2004, Silvana Di Martino wrote: Alle 15:08, lunedì 8 marzo 2004, Stephan Szabo ha scritto: That's what I figured, but given a system where the password is given on startup to the database, you would need another layer for the security, have you though about how that would

Re: [ADMIN] pgcrypto and database encryption

2004-03-07 Thread Stephan Szabo
On Sun, 7 Mar 2004, Silvana Di Martino wrote: 3) This means that you have to manage by yourself all the details of the password one-time entry at the RDBMS start-up time, its storing (in RAM, only) and its passage to the SQL SELECTs. IMHO, this is still far to satisfy our need for a standard

Re: [ADMIN] Database Encryption (now required by law in Italy)

2004-03-05 Thread Stephan Szabo
On Fri, 5 Mar 2004, Silvana Di Martino wrote: Alle 15:11, venerdì 5 marzo 2004, Alex Page ha scritto: If you're trying to protect against somebody taking down your server room door with a sledgehammer, lifting your server out of the rack, driving it away and booting off an alternative

Re: [ADMIN] Database Encryption (now required by law in Italy)

2004-03-05 Thread Stephan Szabo
On Fri, 5 Mar 2004, Silvana Di Martino wrote: Alle 20:14, venerdì 5 marzo 2004, Stephan Szabo ha scritto: Unfortunately, the new Italian law forces us to take seriously into account this catastrophic scenario and another one that is almost as worring: an unfaithful SysAdmin that copies

Re: [ADMIN] Dumping from version 7.3.4 to 7.4.1

2004-02-12 Thread Stephan Szabo
On Wed, 11 Feb 2004, Paulo Rogerio Zimolo wrote: I'm trying to do pg_dump an old version (7.3.4) to a new one (7.4.1) with the following command: pg_dump -U username -h server -i -o database | psql -U username -h newserver newdatabase As a result I got: pg_dump: server

Re: [ADMIN] Foreign Key Question

2004-02-12 Thread Stephan Szabo
On Mon, 9 Feb 2004, Tuan Luu wrote: Example: Table 1: Inventory, Productnr, Productserial (PK Inventory, Prouctnr) Table 2: Pruductnr, Produktdesc, Productversion (PK Productnr; FK Productnr) This Construct gives me an error during the creation in Postgresql (saying there is no

Re: [ADMIN] commit after dead lock

2004-01-29 Thread Stephan Szabo
On Fri, 30 Jan 2004, Gaetano Mendola wrote: Hi all, is it normal that postgres dont complain doing a commit after a deadlock ? kalman=# select * from test where a = 5 for update; ERROR: deadlock detected DETAIL: Process 4144 waits for ShareLock on transaction 40180; blocked by process

Re: [ADMIN] see previous queries

2003-12-04 Thread Stephan Szabo
On Wed, 4 Dec 2003, Ashok Chauhan wrote: i am a new user in postgresql. problem:- in postgresql there is any command to see history (previous day queries) like as history command in linux. Not precisely. For the backend, you can log the statements that are run by changing the

Re: [ADMIN] Trigger to call an external program

2003-12-04 Thread Stephan Szabo
On Thu, 4 Dec 2003, Alan Graham wrote: I'm doing a low cost, low performance roll your own replication project, between various offices around Australia. The replication is asynchronous, and peer to peer. I've looked at the various replication projects, and for one reason or another,

Re: [ADMIN] Index not used. WHY?

2003-12-04 Thread Stephan Szabo
On Thu, 4 Dec 2003, Andrei Bintintan wrote: Hi, I have the following table: CREATE TABLE public.rights ( id int4 DEFAULT nextval('rights_id_seq'::text) NOT NULL, id_user int4 NOT NULL, id_modull int4 NOT NULL, CONSTRAINT rights_pkey PRIMARY KEY (id) ) and I created the following

Re: [ADMIN] Sensitive sort problem?

2003-11-25 Thread Stephan Szabo
On Tue, 25 Nov 2003, Andrei Bintintan wrote: I give an example: These are the datas from the table names: id n1 n2 1 AaAaAaAa 2X X 3A A 4 aa 5 abab 6 _Y_Y 8 ..a..a 9 .x.x 7 ...a...a If I run: select * from names order

Re: [ADMIN] ERROR

2003-11-22 Thread Stephan Szabo
On Sat, 22 Nov 2003, Ashok Chauhan wrote: # include stdlib.h # include libpq-fe.h int main() { int feild; PGresult *result; PGconn *conn; conn = PQconnectdb(database); result = PQexec (conn, select * from teblename); feild = PQntuples

Re: [ADMIN] pg_restore and FK constraints with large dbs

2003-11-17 Thread Stephan Szabo
On Sun, 16 Nov 2003, ow wrote: --- ow [EMAIL PROTECTED] wrote: Perhaps I should clarify. First, I ran pg_dump to extract schema and data *together*. Then I ran pg_restore to restore the db. It took about 1 hour to create tables and copy the data, then about 40 min to create indexes,

Re: [ADMIN] pg_restore and FK constraints with large dbs

2003-11-17 Thread Stephan Szabo
On Mon, 17 Nov 2003, Jeff wrote: On Mon, 17 Nov 2003 10:40:20 -0800 (PST) Stephan Szabo [EMAIL PROTECTED] wrote: By the way, what does your schema look like? I created an 80M row fk table and 20K row pk table with an int4 key between them and indexes on the two key fields. It took

Re: [ADMIN] pg_restore and FK constraints with large dbs

2003-11-17 Thread Stephan Szabo
On Mon, 17 Nov 2003, ow wrote: --- Jeff [EMAIL PROTECTED] wrote: On Mon, 17 Nov 2003 10:40:20 -0800 (PST) Stephan Szabo [EMAIL PROTECTED] wrote: By the way, what does your schema look like? I created an 80M row fk table and 20K row pk table with an int4 key between them

Re: [ADMIN] pg_restore and FK constraints with large dbs

2003-11-17 Thread Stephan Szabo
On Mon, 17 Nov 2003, ow wrote: --- Stephan Szabo [EMAIL PROTECTED] wrote: I assume you're also not modifying the pktable rows (since that would access the fk table based solely on the fk). I do modify the fk table: inserts and updates (but pk is never updated). Also do not delete

Re: [ADMIN] pg_restore and FK constraints with large dbs

2003-11-17 Thread Stephan Szabo
On Mon, 17 Nov 2003, ow wrote: --- Stephan Szabo [EMAIL PROTECTED] wrote: Well, I've been trying to deal with the particular case at hand, ie, get your load in a more reasonable amount of time assuming that you had more constraints and this was going to be a particular problem for you

Re: [ADMIN] pg_restore and FK constraints with large dbs

2003-11-17 Thread Stephan Szabo
On Mon, 17 Nov 2003, ow wrote: --- Stephan Szabo [EMAIL PROTECTED] wrote: Like I said, it's been discussed and I would expect some form of this for 7.5 although I can't say for certain. Enough people were interested in the discussion that it's likely to happen with a little championing

Re: [ADMIN] pg_restore and FK constraints with large dbs

2003-11-16 Thread Stephan Szabo
On Sun, 16 Nov 2003, ow wrote: --- Peter [EMAIL PROTECTED] wrote: Read again. No one was talking of pg_restore. Perhaps I should clarify. First, I ran pg_dump to extract schema and data *together*. Then I ran pg_restore to restore the db. It took about 1 hour to create tables and copy

Re: [ADMIN] pg_restore and FK constraints with large dbs

2003-11-16 Thread Stephan Szabo
On Sun, 16 Nov 2003, ow wrote: --- Stephan Szabo [EMAIL PROTECTED] wrote: Only assuming that no changes were made between dump and restore. This could be changes to schema or data done manually, but it could also be a locale or possibly encoding change if you have any textual foreign

Re: [ADMIN] vacuum full problem

2003-11-11 Thread Stephan Szabo
On Tue, 11 Nov 2003, Antonis Antoniou wrote: Guys, does anyone has any idea? Are you sure that vacuum is not just waiting on a lock that some other transaction is holding? I'd suggest checking the contents of pg_locks. ---(end of broadcast)---

Re: [ADMIN] vacuum full problem

2003-11-11 Thread Stephan Szabo
On Tue, 11 Nov 2003, pginfo wrote: Hi, I can not be sure if it is not the case. But we are usin this system on a number of servers and it happen only by one. Can I with a pg_locks help detect the query that is running? It won't directly tell you what statement is running (although my guess

Re: [ADMIN] vacuum full problem

2003-11-11 Thread Stephan Szabo
On Tue, 11 Nov 2003, pginfo wrote: The result by is: acc01=# select * from pg_locks; relation | database | transaction | pid | mode | granted --+--+-+---+-+- 16757 |16976 | | 23169 | AccessShareLock | t

Re: [ADMIN] vacuum full problem

2003-11-11 Thread Stephan Szabo
On Tue, 11 Nov 2003, pginfo wrote: Stephan Szabo wrote: On Tue, 11 Nov 2003, pginfo wrote: The result by is: acc01=# select * from pg_locks; relation | database | transaction | pid | mode | granted

Re: [ADMIN] vacuum full problem

2003-11-11 Thread Stephan Szabo
On Tue, 11 Nov 2003, pginfo wrote: It is possible to be one not closed transaction, but in this case nobody will be able to modify this table (tables) and the system will stop to respond. The paradox is that the system works well without Not necessarily. People are going to be

Re: [ADMIN] Second postmaster / second DB cluster

2003-10-16 Thread Stephan Szabo
On Thu, 16 Oct 2003, Oli Sennhauser wrote: I would like to start a second postmaster on my server. First problem was the lock file /tmp/.s.PGSQL.5432.lock and its socket. But you can workaround that by the -k parameter. So I was able to start at least 3 clusters... If you want to use

Re: [ADMIN] data restore

2003-10-10 Thread Stephan Szabo
On Fri, 10 Oct 2003, Jodi Kanter wrote: Ok. sorry to confuse everyone...I got my restore to fun to completion so apparently my question about running restores in psql and the ordering of the data are not relevant. I do, however, have one other question I'd like to pose. I am getting serveral

Re: [ADMIN] data restore

2003-10-10 Thread Stephan Szabo
On Fri, 10 Oct 2003, Jodi Kanter wrote: It appears that some of these errors are due to the parent table being populated after the child table. Can I control the order of the copy statements in my script when I run the pg_dump? I think if you use one of the custom formats and pg_restore you

Re: [ADMIN] Delete accident

2003-10-02 Thread Stephan Szabo
On Tue, 30 Sep 2003, Anna Kanevsky wrote: This is an almost embarrassing question, but I managed to delete all rows out of one of the tables by making a little typo in the WHERE statement. Is there any way to restore these? the db was NOT vacuumed after that. but then, it wasn't backed up

Re: Fw: [ADMIN] Case Insensitive Test

2003-09-26 Thread Stephan Szabo
On Fri, 26 Sep 2003, Tom Lane wrote: Stephan Szabo [EMAIL PROTECTED] writes: I've been through them. None of 'em turn off // comments. Or #-sign On at least some versions of gcc it looks like --std=c89 turns them off Hmm, I haven't tried that in particular. I wonder what else it does

Re: Fw: [ADMIN] Case Insensitive Test

2003-09-26 Thread Stephan Szabo
On Fri, 26 Sep 2003, Tom Lane wrote: Stephan Szabo [EMAIL PROTECTED] writes: However, the immediate problem I have seems to come from the fact that on Linux at least we're basically lying to configure about what's in the system headers when we go to compile. port/linux.h on my system

Re: Fw: [ADMIN] Case Insensitive Test

2003-09-26 Thread Stephan Szabo
On Fri, 26 Sep 2003, Peter Eisentraut wrote: Stephan Szabo writes: Configure doesn't find struct addrinfo (because it's in a __USE_POSIX block) so it looks like we use our own version, but, when we're actually then compiling getaddrinfo.c, there's a redefinition error because this time

Re: Fw: [ADMIN] Case Insensitive Test

2003-09-26 Thread Stephan Szabo
On Fri, 26 Sep 2003, Peter Eisentraut wrote: Stephan Szabo writes: It's not a problem for me unless I'm compiling with CFLAGS=-std=c89. Don't do that then. :-) Well, the discussion started with Tom trying to find an option that disallowed // comments for gcc. :) I don't agree

Re: Fw: [ADMIN] Case Insensitive Test

2003-09-25 Thread Stephan Szabo
On Fri, 26 Sep 2003, Tom Lane wrote: Chad R. Larson [EMAIL PROTECTED] writes: I suspect that among the conformance switches, you can find a combination you like: I've been through them. None of 'em turn off // comments. Or #-sign On at least some versions of gcc it looks like --std=c89

Re: [ADMIN] error with functions

2003-09-22 Thread Stephan Szabo
On Mon, 22 Sep 2003 [EMAIL PROTECTED] wrote: You do realize that the shell is going to interpret that string in double quotes right? I guess so, for the very same I have tried with Command: psql test -c CREATE FUNCTION add_one (integer) RETURNS INTEGER AS ' BEGIN RETURN ''$1''

Re: [ADMIN] postgres 6.2 vacuum

2003-09-22 Thread Stephan Szabo
On Mon, 22 Sep 2003, Hornyak Laszlo wrote: Hi all! We have a database on postgreSQL 6.2 and it is extremely slow, so we started vacuum on it. I know it locks the tables, so clients can not use it until the process is finished, but it is extremely slow on a 1.800.000 record table and we

Re: [ADMIN] error with functions

2003-09-21 Thread Stephan Szabo
On Mon, 22 Sep 2003 [EMAIL PROTECTED] wrote: Dear all, This is about the same problem which I have been facing for the past one week and which I am unable to solve. I have create a function which return +1 of the argument passed. Function Definition: CREATE FUNCTION add_one (integer)

Re: [ADMIN] error with functions

2003-09-21 Thread Stephan Szabo
On Mon, 22 Sep 2003 [EMAIL PROTECTED] wrote: Command: psql test -c CREATE FUNCTION add_one (integer) RETURNS INTEGER AS ' BEGIN REURN $1 + 1; END; ' LANGUAGE 'plpgsql'; You do realize that the shell is going to interpret that string in double quotes right?

Re: [ADMIN] Postgresql UPDATE LOCKS unrelated rows.

2003-09-18 Thread Stephan Szabo
On Thu, 18 Sep 2003, Ravi T Ramachandra wrote: Hi, We are using postgresql 7.3.2 on lunux platform. We performed locking test as follows via JDBC: Started 2 concurrent transaction with autocommit false and isolation READ_COMMITTED : Transaction 1: === Update row 1 Sleep

Re: [ADMIN] Postgresql UPDATE LOCKS unrelated rows.

2003-09-18 Thread Stephan Szabo
On Fri, 19 Sep 2003, Ravi T Ramachandra wrote: Here is the table structure. FYI, we tried the experiment with mysql and the concurrency is working fine. create table TABLE1( TABLE_ID IDENTITY NOT NULL , VA_ID SMALLINT NOT NULL,

Re: [ADMIN] LOCK has IGNORED on trigger.

2003-09-04 Thread Stephan Szabo
On Thu, 4 Sep 2003, Yudha Setiawan wrote: Dear Expert, I got a trouble with LOCK on my table (Inquery table). I've put the LOCK (using select bla.bla for update) on trigger(trigger insert) of Table_A. It's work properly. when i tried insert into Table_A bla.bla.bla with more than 5 user in

Re: [ADMIN] No user restriction, Why?

2003-08-28 Thread Stephan Szabo
On Thu, 28 Aug 2003, Ludwig Heusser wrote: Hallo dears PG-Users, I have sucessfully installed the postgreSQL database an I want to administrate the tables with phppgadmin. Almost ist perfekt except that I can't set a user passwort. Wenn I add a new user by using the phppgadmin, the new user

  1   2   3   >