Re: [GENERAL] Creating a session variable in Postgres

2004-06-02 Thread Nagib Abi Fadel
Well i thought about that but i don't feel like it is a clean way. Actually i need to create a dynamic view depending on the user choice of a certain variable via a web application. Let's say for example the variable is called "X". The view is called "t_view" and the temporary table is called "t_

Re: [GENERAL] statement-level statistics are disabled error (postgresql.conf)

2004-06-02 Thread Tom Lane
"Campano, Troy" <[EMAIL PROTECTED]> writes: > I am running 7.4.2: Oh, okay, I thought you were talking about CVS tip. AFAIK, every version of the USERLIMIT code has been broken in one way or another. CVS tip has different failure modes, but it's still fundamentally broken: you can't call superus

Re: [GENERAL] Page access pattern in query plan using index scan

2004-06-02 Thread Alvaro Herrera
On Wed, Jun 02, 2004 at 11:22:53PM -0400, Jack Orenstein wrote: > Alvaro Herrera wrote: > >On Wed, Jun 02, 2004 at 08:38:58PM -0400, Jack Orenstein wrote: > > > > > >>What is the pattern of access to data pages? I can think of two likely > >>answers: > >> > >>1) The index is scanned for ages 30 thr

Re: [GENERAL] Page access pattern in query plan using index scan

2004-06-02 Thread Jack Orenstein
Alvaro Herrera wrote: On Wed, Jun 02, 2004 at 08:38:58PM -0400, Jack Orenstein wrote: What is the pattern of access to data pages? I can think of two likely answers: 1) The index is scanned for ages 30 through 40. As each index entry is scanned, a row is retrieved. This one. There have been nois

Re: [GENERAL] Page access pattern in query plan using index scan

2004-06-02 Thread Alvaro Herrera
On Wed, Jun 02, 2004 at 08:38:58PM -0400, Jack Orenstein wrote: > What is the pattern of access to data pages? I can think of two likely > answers: > > 1) The index is scanned for ages 30 through 40. As each index entry is > scanned, a row is retrieved. This one. There have been noises about do

Re: [GENERAL] PostgreSQL Tablespaces

2004-06-02 Thread Bruce Momjian
TroyGeek wrote: > Any idea roughly on when 7.5 (8.0, or whatever the next release is) will > become available? This month, by the end of the year, a year from now? > This tablespace feature will be extremely powerful and valuable to our > adminitration needs. Estimate September/October of this yea

Re: [GENERAL] PostgreSQL Tablespaces

2004-06-02 Thread TroyGeek
Any idea roughly on when 7.5 (8.0, or whatever the next release is) will become available? This month, by the end of the year, a year from now? This tablespace feature will be extremely powerful and valuable to our adminitration needs. Thank you very much! ~ T r o y ~ -Original Message-

[GENERAL] Page access pattern in query plan using index scan

2004-06-02 Thread Jack Orenstein
Suppose I have a table as follows: testdb=> \d person Table "public.person" Column | Type | Modifiers +-+--- id | integer | not null age| integer

[GENERAL]

2004-06-02 Thread Michael Vodep
Hi! I have a table called "tbltest". There i want to avoid multiple updates at the same time. so i tried to use the transaction method. transaction 1 transaction 2 BEGIN; SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;

[GENERAL] Performing COPY Command

2004-06-02 Thread Rajan Bhide
Title: Message How to perform COPY from memory instead of files?Any examples/pointers would be greatly appreciated.    Thanks in advancedRajan  

[GENERAL] book for postgresql

2004-06-02 Thread Ed Wong
I am an oracle dba and new to postgresql. Could you tell me what is the best postgres book out there to start with? I am looking for a book which is sort of a complete reference including some dba chapters as well. Thanks in advance. ---(end of broadcast)

[GENERAL] statement-level statistics are disabled error (postgresql.conf)

2004-06-02 Thread Campano, Troy
Title: statement-level statistics are disabled error (postgresql.conf) Do you know what I did wrong? I’m trying to enable some logging features in postgresql.conf, but now I get this message when I try to connect to the postgresql server… WARNING:  statement-level statistics are disabled b

[GENERAL] Creating a session variable in Postgres

2004-06-02 Thread Nagib Abi Fadel
Is it possible to create a session variable for each user in Postresql ??   Thx

Re: [GENERAL] Securing a db app - RFC

2004-06-02 Thread Shridhar Daithankar
On Wednesday 02 June 2004 17:58, [EMAIL PROTECTED] wrote: > > You can probably use set session authorization. Here are some brief > > steps. > > > > 1. Convert all your users as postgresql database users > > If he's going to do this, why bother with hard-coding a single user id > and password in th

Re: [GENERAL] Securing a db app - RFC

2004-06-02 Thread btober
> On Wednesday 02 June 2004 02:04, BARTKO Zoltan wrote: >> I would appreciate anyone wiser than me to comment on the following: >> >> I am making an app for PostgreSQL (the server). The clients are >> connecting through the same single user. ... >> >> If I want to access a function (like do this o

Re: [GENERAL] after using pg_resetxlog, db lost

2004-06-02 Thread zhicheng wang
Hi, the /var/log/pgsql is empty but on this message log, what is "rhdb: ^[[60G["? i do not see this before thanks cheng --- Richard Huxton <[EMAIL PROTECTED]> wrote: > zhicheng wang wrote: > > Hi Richard Huxton > > > > below is the rhdb part of the shutdown log > > > > any indications for t

Re: [GENERAL] Securing a db app - RFC

2004-06-02 Thread Shridhar Daithankar
On Wednesday 02 June 2004 02:04, BARTKO Zoltan wrote: > I would appreciate anyone wiser than me to comment on the following: > > I am making an app for PostgreSQL (the server). The clients are connecting > through the same single user. There is a model of the user organization > inside (position hi

Re: [GENERAL] Running Totals and other stuff....

2004-06-02 Thread Richard Huxton
Mike Nolan wrote: Adding a cheque number primary key would work tho' Depending on the specifics of the application, check number may not be a 'unique' field. Automatic bank checks come to mind, on my monthy statments they tend to always have the same check number or none at all. In this case I'd

Re: [GENERAL] ORDER BY with plpgsql parameter

2004-06-02 Thread Richard Huxton
Thomas Schoen wrote: You need to use the FOR-IN-EXECUTE style of query. That way you can use any string you want (including text passed in as a parameter) to build the query inside the function ... that is what i want to avoid. (i wrote that in my first mail) My question was about why it is not po

Re: [GENERAL] ORDER BY with plpgsql parameter

2004-06-02 Thread Thomas Schoen
> You need to use the FOR-IN-EXECUTE style of query. That way > you can use any string you want (including text passed in as > a parameter) to build the query inside the function ... that is what i want to avoid. (i wrote that in my first mail) My question was about why it is not possible to do it

Re: [GENERAL] Dynamic SQL

2004-06-02 Thread Richard Huxton
Hadley Willan wrote: Hi all, I'd like to write a function that would allow me to verify some attributes on a table so that I could give a meaningful error message... constructedSql = ''SELECT INTO recCheckObject * FROM '' || tableName || '' WHERE '' || idColumn || '' = '' || objectId;

Re: [GENERAL] Providing the password to psql from a script

2004-06-02 Thread Richard Huxton
Willem Herremans wrote: I am developing a client application for postgreSQL in Tcl/Tk (see http://gborg.postgresql.org/project/pfm ). It mainly uses PgTcl or pgintcl. I don't have any problems with those, but I am also trying to call psql from my application for SQL statements typed directly by

Re: [GENERAL] after using pg_resetxlog, db lost

2004-06-02 Thread Richard Huxton
zhicheng wang wrote: Hi Richard Huxton below is the rhdb part of the shutdown log any indications for the failed restart? thanks cheng May 28 15:43:37 sanlinux rhdb: Stopping PostgreSQL - Red Hat Edition service: May 28 15:43:37 sanlinux su(pam_unix)[12400]: session opened for user postgres by

Re: [GENERAL] Insert speed question

2004-06-02 Thread Shridhar Daithankar
On Tuesday 01 June 2004 21:42, Josué Maldonado wrote: > Thanks for your responses, > > I did the vacuum but I cannot make the insert again at this moment, even > when that server is not in production so all the resources should be > dedicated to Postgres I think I still have some perfomance issues