Re: [GENERAL] JSP pages don't work with database after postgres downgrade

2006-03-06 Thread Phill Edwards
> Check your postgresql logs firstly. Nothing's showing up in the logs. I can see that postgres has successfully started in syslog when I restart it. I'm not getting anything at all being written to /var/log/postgresql even though debug_level = 4 in /var/lib/pgsql/data/postgresql.conf Does this m

Re: [GENERAL] JSP pages don't work with database after postgres downgrade

2006-03-06 Thread Chris
Phill Edwards wrote: To help you, we would need to know a) if you can run a very simple jsp test to ensure that database connectivity is occuring (i.e. can you pull and display a record) and b) if you are using an cryptography (like MD5) in your password checks. The user logon screen is a sim

Re: [GENERAL] JSP pages don't work with database after postgres downgrade

2006-03-06 Thread Phill Edwards
> To help you, we would need to know a) if you can run a very simple jsp > test to ensure that database connectivity is occuring (i.e. can you pull > and display a record) and b) if you are using an cryptography (like MD5) > in your password checks. The user logon screen is a simple jsp script -

Re: [GENERAL] Sequencial scan instead of using index issue again

2006-03-06 Thread Greg Stark
"Harry Hehl" <[EMAIL PROTECTED]> writes: > I am having an issue with a joins. I am using 8.0.3 on FC4 > > Query: select * from ommemberrelation where srcobj='somevalue' and dstobj in > (select objectid from omfilesysentry where name='dir15_file80'); > > PLAN ... > (29 rows) That plan doesn't

Re: [GENERAL] is it possible to get current_user inside security definer function ?

2006-03-06 Thread Michael Fuhr
On Tue, Mar 07, 2006 at 12:58:29AM -0500, Tom Lane wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > Is this what you're after? I don't know if there's another way. > > > role_user := current_setting('role'); > > We currently define the spec's CURRENT_ROLE as equivalent to > CURRENT_USER

Re: [GENERAL] JSP pages don't work with database after postgres downgrade

2006-03-06 Thread Chris Travers
Phill Edwards wrote: I recently had to downgrade a version of postgres on a devleopment box from 7.3.2 to 7.2.2 to bring it in line with a production server. I reinstalled postgres, postgres-server and postgres-jdbc. Now when I try to run pages from a web application written in JSP using apache/

Re: [GENERAL] JSP pages don't work with database after postgres downgrade

2006-03-06 Thread Tom Lane
"Phill Edwards" <[EMAIL PROTECTED]> writes: > I recently had to downgrade a version of postgres on a devleopment box > from 7.3.2 to 7.2.2 to bring it in line with a production server. If you are working for someone who is running 7.2.2 as a production server, my recommendation is to resign immedi

Re: [GENERAL] is it possible to get current_user inside security definer function ?

2006-03-06 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > Is this what you're after? I don't know if there's another way. > role_user := current_setting('role'); We currently define the spec's CURRENT_ROLE as equivalent to CURRENT_USER, but I wonder if it shouldn't do what Boris is after.

Re: [GENERAL] is it possible to get current_user inside security definer function ?

2006-03-06 Thread Michael Fuhr
On Mon, Mar 06, 2006 at 06:27:06PM +0100, Boris Migo wrote: > Is there any way to get the name of the current user inside a > plpgsql function that is defined with security definer? > > I know that this question was discused earlier, and session_user > should be the answer, but user's curren_user d

[GENERAL] JSP pages don't work with database after postgres downgrade

2006-03-06 Thread Phill Edwards
I recently had to downgrade a version of postgres on a devleopment box from 7.3.2 to 7.2.2 to bring it in line with a production server. I reinstalled postgres, postgres-server and postgres-jdbc. Now when I try to run pages from a web application written in JSP using apache/tomcat they don't work.

Re: [GENERAL] Data corruption zero a file - help!!

2006-03-06 Thread Michael Fuhr
On Tue, Mar 07, 2006 at 01:41:44PM +1100, Noel Faux wrote: > Here is the output from the pg_filedump; is there anything which looks > suss and where would we re-zero the data, if that's the next step: [...] > Block 110025 > - > Block Of

Re: [GENERAL] Is the "ACCESS EXCLUSIVE" lock for TRUNCATE really necessary?

2006-03-06 Thread Tom Lane
"Florian G. Pflug" <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Until when? How would you synchronize the switchover? > Every snapshot would either contain the old, or the new version of > the corresponding pg_class tuple. The ones using the old version > couldn't possible be writer, only rea

Re: [GENERAL] ERROR: xlog flush request not satisfied

2006-03-06 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > I'm seeing the following error in 7.4.6. It first surfaced > after remounting a SAN mount from one box to another and > then running 'vacuum full': > pg_dump: ERROR: xlog flush request 68/7D853080 is not satisfied --- flushed > only to 0/15A90A8 > CONTEXT:

Re: [GENERAL] problem with overloading the "coalesce" function

2006-03-06 Thread Tom Lane
Richard Huxton writes: > Hmm - looking at the source (and \df in psql) it seems the basic problem > is that COALESCE() isn't a function. If it were an ordinary function, it couldn't satisfy the property of not evaluating "unused" arguments ... regards, tom lane

Re: [GENERAL] How to determine the table a query or a views columns

2006-03-06 Thread Chris
Frank Church wrote: Quoting Tom Lane <[EMAIL PROTECTED]>: Can this info be obtained by querying the system tables, especially in the case of views? I am using 'scripting' languages and using C will be quite awkward. I have got to find if libpq's output is exposed in PHP or Ruby. Frank Church

Re: [GENERAL] Question about the contrib rpm ?

2006-03-06 Thread Chris
DANTE ALEXANDRA wrote: Martijn van Oosterhout a écrit : On Mon, Mar 06, 2006 at 02:17:16PM +0100, DANTE ALEXANDRA wrote: Hello, We are working with PostGreSQL since november 2005, and ours questions are automatically those of novice persons, that's why your answer suprises us. The aim

Re: [GENERAL] Is the "ACCESS EXCLUSIVE" lock for TRUNCATE really necessary?

2006-03-06 Thread Tom Lane
"Florian G. Pflug" <[EMAIL PROTECTED]> writes: > Now, I was thinking if TRUNCATE couldn't just let relfilenode in > pg_class point to a new datafile, and leave the old one in place. Until when? How would you synchronize the switchover? > VACUUM could then remove datafiles when it purges a record

Re: [GENERAL] Is the "ACCESS EXCLUSIVE" lock for TRUNCATE really

2006-03-06 Thread Florian G. Pflug
Tom Lane wrote: "Florian G. Pflug" <[EMAIL PROTECTED]> writes: Now, I was thinking if TRUNCATE couldn't just let relfilenode in pg_class point to a new datafile, and leave the old one in place. Until when? How would you synchronize the switchover? Every snapshot would either contain the old,

[GENERAL] Is the "ACCESS EXCLUSIVE" lock for TRUNCATE really necessary?

2006-03-06 Thread Florian G. Pflug
Hi I know that TRUNCATE needs to acquire an ACCESS EXCLUSIVE lock, because it will remove the datafile on commit, and needs to ensure that noone will be using it anymore by then. For a lot of applications (at least mine) this is imposes problems. I'd like to use TRUNCATE in a few places, not only

[GENERAL] Sequencial scan instead of using index issue again

2006-03-06 Thread Harry Hehl
There seems to be many posts on this issue but I not yet found an answer to the seq scan issue. I am having an issue with a joins. I am using 8.0.3 on FC4 Query: select * from ommemberrelation where srcobj='somevalue' and dstobj in (select objectid from omfilesysentry where name='dir15_file80'

Re: [GENERAL] Syntax error, but where?

2006-03-06 Thread Michael Trausch
Bricklen Anderson wrote: > > Is this actually part of the function: $$FUNC_BODY$$ ? > If so, try it as $FUNC_BODY$ (single dollar signs around identifier). > Oh, jeez. What an oversight. Thank you... I can't believe that I missed that. Sometimes, all that really is needed is a fresh pair of e

[GENERAL] is it possible to get current_user inside security definer function ?

2006-03-06 Thread Boris Migo
Is there any way to get the name of the current user inside a plpgsql function that is defined with security definer? I know that this question was discused earlier, and session_user should be the answer, but user's curren_user doesn't have to be the same as session_user before function call

Re: [GENERAL] [pgsql-general] Daily digest v1.5986 (24 messages)

2006-03-06 Thread Marc Munro
Sylvain, All of the things you want to do can be done using Veil: http://veil.projects.postgresql.org/ Be warned though, it is not simple. If you want privileges at the column level, or based on a where clause, you will have to use techniques like Veil's secured views. It's better to avoid this

[GENERAL] CRLF problem going from Linux PostgreSQL server to WinXP client via ODBC.

2006-03-06 Thread Roy Souther
I have some multi-line address fields in my Linux PostgreSQL that get populated as Linux lines with CR line terminators. This works fine until a Windows client connects to it over ODBC and then barks because the end of line is not in CRLF format. Is there a simple fix for this? Is there anythi

Re: [GENERAL] About when we should setup index?

2006-03-06 Thread Michael Fuhr
On Mon, Mar 06, 2006 at 03:01:15PM -0500, Emi Lu wrote: > . id is the primary key, so a default unique index is generated > automatically ? Yes. When you issue the CREATE TABLE statement you should see a notice like the following: CREATE TABLE / PRIMARY KEY will create implicit index "test_pkey

Re: [GENERAL] pg-admin

2006-03-06 Thread Tino Wildenhain
Mary Adel schrieb: > I am a new user for Pg-admin and i just inatlled it on Linux and i need > to connect it on server but their is error that comes up to me which is: > Is server running on host and accepting TCP connection on the port 5432 > Which part of that message dont you understand? Make

[GENERAL] pg-admin

2006-03-06 Thread Mary Adel
I am a new user for Pg-admin and i just inatlled it on Linux and i need to connect it on server but their is error that comes up to me which is: Is server running on host and accepting TCP connection on the port 5432 Thanks, mary ---(end of broadcast)-

Re: [GENERAL] ERROR: xlog flush request not satisfied

2006-03-06 Thread Ed L.
On Monday March 6 2006 12:47 pm, Ed L. wrote: > I'm seeing the following error in 7.4.6. It first surfaced > after remounting a SAN mount from one box to another and > then running 'vacuum full': > > pg_dump: ERROR: xlog flush request 68/7D853080 is not > satisfied --- flushed only to 0/15A90A8 C

[GENERAL] About when we should setup index?

2006-03-06 Thread Emi Lu
Hello, I have some questions about index. For example, we have a table test(id varchar(7) not null primary key, name varchar(15) , sex varchar(1) , birth_date date, valid_in_table boolean not null, time_stamp timestamp not null default now() ); . id is the primary

[GENERAL] ERROR: xlog flush request not satisfied

2006-03-06 Thread Ed L.
I'm seeing the following error in 7.4.6. It first surfaced after remounting a SAN mount from one box to another and then running 'vacuum full': pg_dump: ERROR: xlog flush request 68/7D853080 is not satisfied --- flushed only to 0/15A90A8 CONTEXT: writing block 34 of relation 17156/1470533 pg_d

Re: [GENERAL] Using same database from XP and Linux in notebook

2006-03-06 Thread metadev
On 3/4/06, William Penberthy <[EMAIL PROTECTED]> wrote: Here is an example I always used as a start point in this type of project.http://campbellcentral.org/rick/code/setup.htmlGenerally, I would store the datafiles on an NTFS partition - it seems easier to reach NTFS from Linux then vice-versa.I h

Re: [GENERAL] Syntax error in Execute statement

2006-03-06 Thread Michael Fuhr
On Mon, Mar 06, 2006 at 07:21:58AM -0800, Emil Rachovsky wrote: > I created a function "coalescec" which behaves the > same as coalesce, but uses an integer and a string. Is there a reason you can't use the standard COALESCE and cast the integer value to text/varchar? > Now I'm getting an error i

Re: [GENERAL] Using same database from XP and Linux in notebook

2006-03-06 Thread Steve Atkins
On Mar 4, 2006, at 7:51 AM, Andrus Moor wrote: I have notebook which can be booted into Windows XP/NTFS and into Linux. Notebook is not connected to any network. There are separate IDE partitions for both OS. I want same Postgres 8.1 database to be available in both modes. I think I must

Re: [GENERAL] Using same database from XP and Linux in notebook

2006-03-06 Thread Jim C. Nasby
As a heads-up, the database has some protection mechanisms that may not allow you to do this. I can't say for certain, though, so it's at least worth a shot. I'm interested to know how it turns out. On Sat, Mar 04, 2006 at 10:43:41AM -0700, William Penberthy wrote: > Here is an example I always us

Re: [GENERAL] Using same database from XP and Linux in notebook

2006-03-06 Thread Andrus
> Here is an example I always used as a start point in this type of project. > > http://campbellcentral.org/rick/code/setup.html > > Generally, I would store the datafiles on an NTFS partition - it seems > easier to reach NTFS from Linux then vice-versa. Bill, Your example mounts NTFS as read-onl

Re: [GENERAL] [OFFTOPIC] Typo3 + Postgresql anyone?

2006-03-06 Thread Florian G. Pflug
Florian G. Pflug wrote: Hi My company wants to run Typo3, and I'd like it to run against postgresql instead of mysql (Don't want to have to administer a mysql database ;-). I've googled a bit now, and it seems that I need ADODB for php + some Typo3 extension. Does anyone know of a howto that ex

Re: [GENERAL] Syntax error, but where?

2006-03-06 Thread Bricklen Anderson
Michael Trausch wrote: Hey guys, I'm having a slight problem with this database that I'm trying to setup on PostgreSQL 8.1.3... What I've got is a stored procedure that refuses to get itself into the system, and I'm not sure why. It is throwing a syntax error on DECLARE, but I don't see it. I

[GENERAL] Syntax error in Execute statement

2006-03-06 Thread Emil Rachovsky
Hello, I created a function "coalescec" which behaves the same as coalesce, but uses an integer and a string. Now I'm getting an error in the folowing statements : query := 'select "UID" from S_Users_To_Connection where ConnID = ' || coalescec(conn_id,'null'); execute query into nUID; ERROR:

Re: [GENERAL] ECPG and COPY

2006-03-06 Thread Bruce Momjian
Michael Meskes wrote: > > > Yes, it's still an open report. Sorry, about that and all the other open > > > bug reports/feature requests. I do not have the time at the moment to > > > even reproduce bugs. Hopefully this will become better in the near > > > future. > > > > Should we add this to TODO?

[GENERAL] Syntax error, but where?

2006-03-06 Thread Michael Trausch
Hey guys, I'm having a slight problem with this database that I'm trying to setup on PostgreSQL 8.1.3... What I've got is a stored procedure that refuses to get itself into the system, and I'm not sure why. It is throwing a syntax error on DECLARE, but I don't see it. I looked at the documentati

Re: [GENERAL] Question about the contrib rpm ?

2006-03-06 Thread DANTE ALEXANDRA
Martijn van Oosterhout a écrit : On Mon, Mar 06, 2006 at 02:17:16PM +0100, DANTE ALEXANDRA wrote: Hello, We are working with PostGreSQL since november 2005, and ours questions are automatically those of novice persons, that's why your answer suprises us. The aim of our question about th

Re: [GENERAL] Question about the contrib rpm ?

2006-03-06 Thread Martijn van Oosterhout
On Mon, Mar 06, 2006 at 02:17:16PM +0100, DANTE ALEXANDRA wrote: > Hello, > > We are working with PostGreSQL since november 2005, and ours questions > are automatically those of novice persons, that's why your answer > suprises us. > > The aim of our question about the "contrib" rpm was to unde

Re: [GENERAL] Question about the contrib rpm ?

2006-03-06 Thread DANTE ALEXANDRA
Hello, We are working with PostGreSQL since november 2005, and ours questions are automatically those of novice persons, that's why your answer suprises us. The aim of our question about the "contrib" rpm was to understand why this package exists, what it is used for, and how generate it. We

Re: [GENERAL] How to determine the table a query or a views columns come from?

2006-03-06 Thread Frank Church
Quoting Tom Lane <[EMAIL PROTECTED]>: Can this info be obtained by querying the system tables, especially in the case of views? I am using 'scripting' languages and using C will be quite awkward. I have got to find if libpq's output is exposed in PHP or Ruby. > Frank Church <[EMAIL PROTECTED]> w

Re: [GENERAL] problem with overloading the "coalesce" function

2006-03-06 Thread Richard Huxton
Emil Rachovsky wrote: --- Richard Huxton wrote: Emil Rachovsky wrote: Hi, I am trying to overload the "coalesce" function to accept an integer and a string. Here it is : CREATE OR REPLACE FUNCTION "coalesce"(a int4, b "varchar") RETURNS "varchar" AS ... I have added it to pg_catalog, b

Re: [GENERAL] problem with overloading the "coalesce" function

2006-03-06 Thread Emil Rachovsky
--- Richard Huxton wrote: > Emil Rachovsky wrote: > > > > Hi, > > I am trying to overload the "coalesce" function to > > accept an integer and a string. Here it is : > > > > CREATE OR REPLACE FUNCTION "coalesce"(a int4, b > > "varchar") > > RETURNS "varchar" AS > ... > > I have added it to

Re: [GENERAL] problem with overloading the "coalesce" function

2006-03-06 Thread Richard Huxton
Emil Rachovsky wrote: Hi, I am trying to overload the "coalesce" function to accept an integer and a string. Here it is : CREATE OR REPLACE FUNCTION "coalesce"(a int4, b "varchar") RETURNS "varchar" AS ... I have added it to pg_catalog, but still I cant't use it, I get an error on the seco

[GENERAL] problem with overloading the "coalesce" function

2006-03-06 Thread Emil Rachovsky
Hi, I am trying to overload the "coalesce" function to accept an integer and a string. Here it is : CREATE OR REPLACE FUNCTION "coalesce"(a int4, b "varchar") RETURNS "varchar" AS $BODY$ begin if (a is null ) then return b; else return cast(a as varchar(15)); end if; end $BODY$ LAN

Re: [GENERAL] query timeout

2006-03-06 Thread Csaba Nagy
On Fri, 2006-03-03 at 21:14, Rick Gigger wrote: > I assume that running the vacuumdb command is the same as running it > through psql? Well, you either run it through psql, or not :-) Seriously, I understand that any client session is affected by the statement timeout settings, doesn't matter w

Re: [GENERAL] Data corruption zero a file - help!!

2006-03-06 Thread Michael Fuhr
On Mon, Mar 06, 2006 at 05:17:54PM +1100, Noel Faux wrote: > dd bs=8k skip=115860 count=1 > if=/usr/local/postgresql/postgresql-7.4.8/data/base/37958/111685332.68 | > od -x Wrong block (115860) -- you used the number from my earlier message, which was based on the bad block being 902292. After