Re: [GENERAL] reading vacuum verbosity

2004-05-21 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > Below are 3 snippets from 3 successive vacuums on a table > with ~284K rows which receives many many UPDATEs and a few > INSERTs (there were also a few runs of ANALYZE in between > these VACUUMs): > INFO: Pages 22652: Changed 4, Empty 0; Tup 284139: Vac 927,

Re: [GENERAL] Am I locking more than I need to?

2004-05-21 Thread Jeff Davis
> I'm not sure what potential race condition you see since you haven't said > much about how your transactions fit in here. But I would suggest you go > with your first design and don't worry about any explicit locking > unless/until it clearly becomes a problem. I've built numerous things >

Re: [GENERAL] Am I locking more than I need to?

2004-05-21 Thread Jeff Davis
> Various sorts of race conditions are possible in multi-user > multi-tasking systems; what _actual_ problem are you expecting to have > here? > I posted the condition as a reply to Ed L., and copied it to the bottom of this message. > What I would expect is that putting a unique index onto car

Re: [GENERAL] can't get async mode to deliver small batches of rows

2004-05-21 Thread Tom Lane
Mark Harrison <[EMAIL PROTECTED]> writes: > I can't seem to get PG into non-blocking mode. "Non-blocking" does not mean "will deliver an incomplete result". It just means you can get control back while waiting for the complete result (though not with the code you show...) You probably want to thi

Re: [GENERAL] Porting SQL Server 2000 database to PostgreSQL

2004-05-21 Thread Richard Huxton
Rod Early wrote: I have the task of converting a SQL Server 2000 database to PostgreSQL. The data itself does not need to be converted, but the structure and stored procedures must be. I expect that converting tables and views will be simple. I expect that converting stored procedures and user-de

[GENERAL] feature idea – automatic update tracking using date fields – feedback pls

2004-05-21 Thread anony
Maybe this feature is already out there. I guess you could write triggers to do some of this. Often when designing a database I add a start_date and end_date column to the table. The start_date is when the record was created and the end_date is when the record expired. For UPDATES, I populate the

Re: [GENERAL] Porting SQL Server 2000 database to PostgreSQL

2004-05-21 Thread anony
1. stored procedures are now called functions 2. unlike ms tsql, in postgres query analyzer you can't test conditional statements and variables outside of a function. this makes debugging really hard. 3. inside the function single quotes must be escaped because your function is entered in as a st

Re: [GENERAL] Web DB Management tool

2004-05-21 Thread Richard Huxton
Daniel Baughman wrote: I am looking for something like 'phpmyadmin' for postgre, so I can admin all my DB's through a web site. Anyone had any good experiences? Or any really good just plain applications that do that? You'll probably want phppgadmin. -- Richard Huxton Archonet Ltd ---

Re: [GENERAL] Problem with public schema

2004-05-21 Thread Richard Huxton
Nick Allan wrote: Hi all I've just started using postgres and have all my tables defined in the public schema. For some reason I'm being forced to use sql like the following select * from public."tblCategory"; instead of select * from tblCategory; You must have defined it as: CREATE TABLE "tblCa

Re: [GENERAL] Unix timestamp , unix timestamp with microseconds

2004-05-21 Thread Richard Huxton
In. Martin Prášek wrote: I I read the documentation well (PG 7.3.3 ) , i see that there is not a native support for data type UNIX TIMESTAMP and "unix timestamp expressed as microseconds" ie there it is impossible to direct insert and select seconds_from _Epoch seconds_from _Epoch (pe

Re: [GENERAL] Web DB Management tool

2004-05-21 Thread Adam Witney
There is phpPgAdmin which works very nicely http://phppgadmin.sourceforge.net/ But there are others, take a look under "Administration Tools" here http://techdocs.postgresql.org/oresources.php > I am looking for something like 'phpmyadmin' for postgre, so I can admin all > my DB's through a w

Re: [GENERAL] feature idea – automatic up

2004-05-21 Thread Richard Huxton
anony wrote: Maybe this feature is already out there. I guess you could write triggers to do some of this. Often when designing a database I add a start_date and end_date column to the table. The start_date is when the record was created and the end_date is when the record expired. For UPDATES, I

Re: [GENERAL] Equivalent for mysql's FOUND_ROWS()

2004-05-21 Thread Jan Wieck
Victor Spång Arthursson wrote: With mysql it's possible to add a parameter "SQL_CALC_FOUND_ROWS" to the selectstatement and then after having made a query to the database with a limit clause you can fire off a second query, "SELECT found_rows() as numberofrows" to get the number of rows the quer

[GENERAL] dynamic parameters in procedure

2004-05-21 Thread Robin Ericsson
Hi, I want to create a stored procedure that can take a dynamic number of in-parameters and base an inside-query based on those parameters. My ideas was to use text[] as input parameters like this. CREATE OR REPLACE FUNCTION get_table(text[]) RETURNS SETOF table AS ' DECLARE params AL

Re: [GENERAL] About PostgreSQL

2004-05-21 Thread Christopher Browne
Oops! [EMAIL PROTECTED] ("Valentin Petkov") was seen spray-painting on a wall: > I want to download PostgreSQL how it is work?:p> You might want to visit , and follow the links marked "Download". > Must I register somewhere?:p> No, that is not necessary. Well, actual

Re: [GENERAL] Am I locking more than I need to?

2004-05-21 Thread Christopher Browne
Clinging to sanity, [EMAIL PROTECTED] (Jeff Davis) mumbled into her beard: >> Various sorts of race conditions are possible in multi-user >> multi-tasking systems; what _actual_ problem are you expecting to have >> here? > > I posted the condition as a reply to Ed L., and copied it to the bottom >

Re: [GENERAL] ORDER BY 'DK', 'DE', DESC?

2004-05-21 Thread Adam Ruth
On May 20, 2004, at 12:19 PM, Stephan Szabo wrote: On Thu, 20 May 2004, Adam Ruth wrote: On May 20, 2004, at 11:20 AM, Stephan Szabo wrote: On Tue, 11 May 2004, [ISO-8859-1] Victor Spång Arthursson wrote: Hi! I would like to know if it's possible to give a priority order of how to sort the returni

Re: [GENERAL] PostgreSQL delete the blank in the end of the String

2004-05-21 Thread Stephan Szabo
On Tue, 18 May 2004 [EMAIL PROTECTED] wrote: > hello, > > my Name is Rong. I am student at TU-Munich. I have some questions for > Postgresql7.2 under SuSe Linux. > Postgresql7.2 under SuSe Linux8.0. > I use PostgreSQL7.2 with PGAdminII1.4.2 under Windows2000. Note, 7.2 is fairly old (and I hope

[GENERAL] Automatically fudging query results?

2004-05-21 Thread Alex Scollay
Let's say I have a column whose values are all 2-digit integers, e.g. 82 (though it's actually a varchar field). From now on, the column will be able to have 2-digit as well as 3-digit integers. In the application that uses these values, a value of the format x0y is considered to be the same as xy.

Re: [GENERAL] pg_temp_N temp schema buildup

2004-05-21 Thread Mike G
I believe they are created when either a function / program creates a temporary table. On Wed, May 19, 2004 at 08:32:06AM -0400, Jerry Sievers wrote: > Hello. > > I'm running postgres 7.4.1 and notice an accumulation of temp schemas > named pg_temp_1, pg_temp_2... etc. > > These schemas are empt

[GENERAL] psql -E is not working in 7.4.2 like 7.3.4

2004-05-21 Thread Durai
Hello All, I built the latest postgresql 7.4.2 in HPUX PA. The command "psql -E ", is not give give the output like in 7.3.4. In Postgresql 7.3.4, it gives the following output: $ echo "select * from db5;" | psql -E test * QUERY ** BEGIN; SELECT usesuper FROM pg_catalog.pg_user

Re: [GENERAL] Restricted query

2004-05-21 Thread Marco Lazzeri
And what about restricting UPDATE/DELETE queries too. Can I still use VIEWs? Bye Il mer, 2004-05-19 alle 05:06, Joshua D. Drake ha scritto: > You could use a view and give group rights to a particular view. > > Josué Maldonado wrote: > > > Hello list, > > > > This is an inventory system where