[BUGS] pgsql + psql + su

2004-04-05 Thread rajesh k
hi ,

i'm workin with rh9 (just a beginner).
I'v installed postgreSQL 7.3.6 on location 
  /usr/local/pgsql
but there is also a default pgsql (i think of rh9)
at location
  /var/lib/pgsql   (this is 7.3.2) 

what i did
--
[EMAIL PROTECTED] root]# cd /usr/local/pgsql/bin
[EMAIL PROTECTED] bin]# su postgres
bash-2.05b$ pg_ctl -D /usr/local/pgsql/data start
postmaster successfully started

bash-2.05b$ createdb testdb4
CREATE DATABASE
bash-2.05b$ psql testdb4

problem :

1>
psql: relocation error: psql: undefined symbol:
PQgetssl
LOG:  pq_recvbuf: unexpected EOF on client connection

2>
how to solve PQgetssl ??

3>
FATAL:  Database "postgres" does not exist in the
system catalog.
psql: FATAL:  Database "postgres" does not exist in
the system catalog.

4>
bash-2.05b$ su postgres
Password:
su: incorrect password

 what is the su password ???
 how can i change it ?

plz let me al my problems
thanx
bii,   



 

__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


[BUGS] psql: relocation error: psql: undefined

2004-04-05 Thread rajesh k
Subject : psql: relocation error: psql: undefined
symbol: PQgetssl


hi ,

platform : redhat linux 9
---
Is postgreSQL 7.3.2 already installed on
rh9(by-default)  

I have tried using both the postgresql-7.3.2.tar.gz
and  postgresql-7.3.6.tar.gz
I get the same error:

bash-2.05b$]$ createdb test
  CREATE DATABASE

bash-2.05b$]$ psql test
Welcome to psql, the PostgreSQL interactive terminal.
 
Type:  \copyright for distribution terms
   \h for help with SQL commands
   \? for help on internal slash commands
   \g or terminate with semicolon to execute query
   \q to quit
 
psql: relocation error: psql: undefined symbol:
PQgetssl

Can you please advise me what to do?

thanx,

__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


[BUGS] memory corruption bug

2004-04-05 Thread Alan Stange
If PostgreSQL failed to compile on your computer or you found a bug that
is likely to be specific to one platform then please fill out this form
and e-mail it to [EMAIL PROTECTED]

To report any other bug, fill out the form below and e-mail it to
[EMAIL PROTECTED]

If you not only found the problem but solved it and generated a patch
then e-mail it to [EMAIL PROTECTED] instead.  Please use the
command "diff -c" to generate the patch.

You may also enter a bug report at http://www.postgresql.org/ instead of
e-mail-ing this form.


POSTGRESQL BUG REPORT TEMPLATE



Your name   :Alan Stange
Your email address  :[EMAIL PROTECTED]  


System Configuration
-
  Architecture (example: Intel Pentium) : Sun UltraSparc IIICu

  Operating System (example: Linux 2.4.18)  : Solaris 9

  PostgreSQL version (example: PostgreSQL-7.4.1):   PostgreSQL-7.4.1

  Compiler used (example:  gcc 2.95.2)  : Sun spro9.  


Please enter a FULL description of your problem:

There's memory corruption occuring causing the malloc routines to SIGBUS.   This is 
typically caused
by a routine overwriting the end of malloc()'d memory causing corruption to the meta 
data used by malloc(), 
free(), realloc(), etc.

We have this happen about once / day.

program terminated by signal BUS (invalid address alignment)
0xff043694: realfree+0x023c:ld   [%o2 + 8], %o0
(dbx) where
=>[1] realfree(0x703b50, 0x782c0, 0x51, 0xff0bc000, 0x3c, 0x18cf08), at 0xff043694
  [2] cleanfree(0x0, 0x9, 0xff0c26ec, 0x10018, 0x703b50, 0x0), at 0xff043d90
  [3] _malloc_unlocked(0x20018, 0x79270, 0x0, 0xff0bc000, 0x0, 0x0), at 0xff042ebc
  [4] malloc(0x20018, 0x20007, 0x0, 0x0, 0x0, 0x0), at 0xff042dac
  [5] AllocSetAlloc(0x5cadf8, 0x2, 0x0, 0x0, 0x0, 0x2000), at 0x24fdfc
  [6] AllocSetRealloc(0x5cadf8, 0x604608, 0x2, 0x604608, 0x2000, 0x604600), at 
0x25053c
  [7] enlargeStringInfo(0xffbfed48, 0x10473, 0x2, 0x10474, 0x100, 0x1), at 0x10fb10
  [8] pq_getmessage(0xffbfed48, 0x0, 0x0, 0x0, 0x2ff910, 0x604608), at 0x1181bc
  [9] SocketBackend(0xffbfed48, 0x310400, 0x51, 0x3, 0x3c, 0x18cf08), at 0x18d2bc
  [10] PostgresMain(0x190400, 0x310c00, 0x1, 0x315000, 0x310c00, 0x1), at 0x19193c
  [11] BackendFork(0x364b18, 0x356848, 0x2d043c, 0x2d044c, 0x310400, 0x319958), at 
0x15b988
  [12] BackendStartup(0x364b18, 0x7f7f7c00, 0x7f7f7c00, 0x3541d8, 0x6e0c3a8f, 
0x349c00), at 0x15b170
  [13] ServerLoop(0xc0, 0x310640, 0x364b18, 0x320e64, 0x1, 0x1), at 0x159814
  [14] PostmasterMain(0x15b800, 0x15a500, 0x, 0x349000, 0x354000, 0x315000), 
at 0x159048
  [15] main(0x1, 0x35608c, 0x3543d8, 0x3541d8, 0x0, 0x278), at 0x119bf4


These bugs are hard to fix.  The actual corruption could have occured much earlier in 
the execution.

We had the same error with the gcc compilers as well.  We're using the Sun compilers 
as the resulting
PG binaries are much faster.


Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible: 
--
Sadly, we have no reproducible test case right now.  




If you know how this problem might be fixed, list the solution below:
-

Typically one would use a tool like purify, bcheck, etc., to find the offending code.


---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[BUGS] Problem starting postgresql !!

2004-04-05 Thread rahul
Hi,

I had postgresql 7.3 rpm installed on redhat 9 platform. i removed it 
and downloaded and installed following rpm's from ur ftp site:-

[EMAIL PROTECTED] postgresql-7.4]# rpm -qa |grep postgre
postgresql-debuginfo-7.4-0.5PGDG
postgresql-libs-7.4-0.5PGDG
postgresql-contrib-7.4-0.5PGDG
postgresql-devel-7.4-0.5PGDG
postgresql-test-7.4-0.5PGDG
postgresql-7.4-0.5PGDG
postgresql-server-7.4-0.5PGDG
now when i try to start postgresql, i am getting :-

[EMAIL PROTECTED] init.d]# ./postgresql start

An old version of the database format was found.\nYou need to upgrade 
the data format before using PostgreSQL.\nSee 
/usr/share/doc/postgresql-7.4/README.rpm-dist for more information.

could u please let me know, how to get rid of this problem.

Regards
Rahul D.




---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
 subscribe-nomail command to [EMAIL PROTECTED] so that your
 message can get through to the mailing list cleanly


[BUGS] Sequential Scan Index Bug

2004-04-05 Thread Gabriel Weinberg

I have a table with an integer column with about 10M rows in it.

This column has an index (btree).

When I try to select a row using this column with an integer, e.g. select *
from table where id=4, it always uses the index.  However, if I select try
to select a row using this column with a decimal, e.g. select * from table
where id=4.343, it skips the index entirely and does a sequential scan of
the table.

I am using v7.4.2 on Freebsd 4.9.

Gabriel

_
Gabriel Weinberg
[EMAIL PROTECTED] 


---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


[BUGS] Renaming a table leaves orphaned implicit sequences which breaks pg_restore.

2004-04-05 Thread Victor Sudakov

Hello. 

I use PostgreSQL 7.4.2 on i386-portbld-freebsd5.2, compiled by GCC cc (GCC) 3.3.3 
[FreeBSD] 20031106

Description:
It seems that renaming tables with columns of type "serial" leaves
"orphaned" implicit sequences which breaks pg_restore.

How to reproduce:

1. Create a table 

CREATE DATABASE something1;
CREATE DATABASE something2;
\c something1
CREATE TABLE test1 (id serial, name char(12));
ALTER TABLE test1 RENAME TO test2;

2. Run dump/restore and get an error:

$ pg_dump -Fc something1 | pg_restore -d something2
pg_restore: NOTICE:  CREATE TABLE will create implicit sequence "test2_id_seq" for 
"serial" column "test2.id"
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "test1_id_seq" 
does not exist

Workaround:
Do not use the "serial" data type, always create sequences explicitly.
pg_dump always generates a "CREATE SEQUENCE" clause for explicit
sequences.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] Bug #641: LIBPQ Linking with the static library on the WIN32 platform fails connections with "unknown host name".

2004-04-05 Thread Johan Duflost



Dear sir,
 
I installed mapserver a cgi using libpq client 
library under win2K within tomcat. I tried to display postgis layers stored on 
another host but I got the error message "unknown host name". I don't have any 
skill in C programming. Could you tell me how I have to patch fe-connect.c file 
? I really need help. Thank you in advance,
 
Johan Duflost
 
Johan DuflostAnalyst ProgrammerBelgian 
Biodiversity Information Facility (BeBIF)Universite Libre de Bruxelles 
(ULB)Boulevard du Triomphe - campus de la plaineB-1050 Bruxelleshttp://gis.bebif.be


Re: [BUGS] BUG #1110: psql -h localhost consults the nameservice

2004-04-05 Thread Enke, Michael
Tom Lane wrote:
"PostgreSQL Bugs List" <[EMAIL PROTECTED]> writes:

If I call "psql -h localhost" it is very slow
compared to "psql -h 127.0.0.1" since for "localhost"
the nameservice is consulted.


This is not a bug; it's supposed to do that.  If you don't like it,
reconfigure your name service (see /etc/nsswitch.conf and /etc/resolv.conf).
			regards, tom lane


Ok, I'm not sure if this is a bug or not.
But definitively for postgresql version 7.3.3 on RedHat Linux,
for "localhost" it was not contacting the name service.
This difference I noticed.
Regards,
Michael
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


Re: [BUGS] memory corruption bug

2004-04-05 Thread Tom Lane
Alan Stange <[EMAIL PROTECTED]> writes:
> There's memory corruption occuring causing the malloc routines to
> SIGBUS.
> ...
> Sadly, we have no reproducible test case right now.  

Without a test case there's not much we can do :-(.  The backtrace you
show is during client query collection, which is a quite well-tested
code path and hardly likely to contain such errors, so I would venture
that the memory clobber occurred previously.  Meaning that this trace
gives no useful data about where it is.

Some versions of Solaris are known to contain a broken vsnprintf()
library routine that can result in memory clobbers.  I don't recall
which versions exactly, but I think it was only in 64-bit builds;
is yours 64-bit?  Anyway you might try undef'ing HAVE_VSNPRINTF and
HAVE_SNPRINTF in src/include/pg_config.h after configure (to force
use of our own emulations of those routines) to see if that helps.
Also try scanning the pgsql-bugs archives for other mentions of Solaris
to see if there are other such issues ...

> Typically one would use a tool like purify, bcheck, etc., to find the
> offending code.

Without being able to duplicate the crash, it's unlikely anyone else
could find the problem.  We haven't heard similar reports, so this is
either a platform-specific issue or a consequence of some corner case
that you are exercising and other people aren't.  Either way, the most
likely way to learn something from Purify is for you to run it ...

regards, tom lane

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [BUGS] Problem starting postgresql !!

2004-04-05 Thread Lamar Owen
On Monday 29 March 2004 02:51 am, rahul wrote:
> I had postgresql 7.3 rpm installed on redhat 9 platform. i removed it
> and downloaded and installed following rpm's from ur ftp site:-

> An old version of the database format was found.\nYou need to upgrade
> the data format before using PostgreSQL.\nSee
> /usr/share/doc/postgresql-7.4/README.rpm-dist for more information.

> could u please let me know, how to get rid of this problem.

If you did not have any data you want to keep, run 'rm 
-rf /var/lib/pgsql/data/* ' and execute the initscript again.

If you DO have data you want to keep, you need to reinstall the old version, 
dump its data, remove the old/install the new, blow out the directory, start 
the new, and restore your data.
-- 
Lamar Owen
Director of Information Technology
Pisgah Astronomical Research Institute
1 PARI Drive
Rosman, NC  28772
(828)862-5554
www.pari.edu

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [BUGS] Problem starting postgresql !!

2004-04-05 Thread Peter Eisentraut
rahul wrote:
> An old version of the database format was found.\nYou need to upgrade
> the data format before using PostgreSQL.\nSee
> /usr/share/doc/postgresql-7.4/README.rpm-dist for more information.
>
> could u please let me know, how to get rid of this problem.

Follow the instructions in  
/usr/share/doc/postgresql-7.4/README.rpm-dist.


---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [BUGS] Bug #641: LIBPQ Linking with the static library on the WIN32 platform fails connections with "unknown host name".

2004-04-05 Thread Peter Eisentraut
Johan Duflost wrote:
> I installed mapserver a cgi using libpq client library under win2K
> within tomcat. I tried to display postgis layers stored on another
> host but I got the error message "unknown host name". I don't have
> any skill in C programming. Could you tell me how I have to patch
> fe-connect.c file ? I really need help. Thank you in advance,

You need to give us a specific, detailed, reproduceable description of 
your system or else we can't begin to help you.  It's not even clear 
what host name it is trying to use or who is trying to use it.


---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [BUGS] Renaming a table leaves orphaned implicit sequences which

2004-04-05 Thread Paul Tillotson
I got bitten by this one also. Perhaps it would be possible to change
pg_dump so that it dumps the create table statement with the explicit
sequence, rather than the original SQL used to create the table? (This
would preserve old dumps and the syntactical sugar which I would not
want to forego.)
Paul Tillotson

Hello. 

I use PostgreSQL 7.4.2 on i386-portbld-freebsd5.2, compiled by GCC cc (GCC) 3.3.3 [FreeBSD] 20031106

Description:
It seems that renaming tables with columns of type "serial" leaves
"orphaned" implicit sequences which breaks pg_restore.
How to reproduce:

1. Create a table 

CREATE DATABASE something1;
CREATE DATABASE something2;
\c something1
CREATE TABLE test1 (id serial, name char(12));
ALTER TABLE test1 RENAME TO test2;
2. Run dump/restore and get an error:

$ pg_dump -Fc something1 | pg_restore -d something2
pg_restore: NOTICE:  CREATE TABLE will create implicit sequence "test2_id_seq" for "serial" 
column "test2.id"
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "test1_id_seq" 
does not exist
Workaround:
Do not use the "serial" data type, always create sequences explicitly.
pg_dump always generates a "CREATE SEQUENCE" clause for explicit
sequences.
 



---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


[BUGS] bug in 7.4.2, with Handling of Double Quotation Marks

2004-04-05 Thread Alexander S
Bug in 7.4.2.. Concern with handling of Double  Quotation Marks ("). 
Escape of  double quotation marks can't solve the problem.

--
CREATE TABLE public.test
(
 my_column varchar NOT NULL,
 CONSTRAINT my_primary PRIMARY KEY (my_column)
) WITHOUT OIDS;
---
CREATE TABLE public.ref_test
(
 my_column varchar[]
) WITH OIDS;
---
CREATE FUNCTION public."t-f_ref_test"()
RETURNS trigger AS
'BEGIN
FOR i IN 1..30 LOOP
   IF NEW."my_column"[i] not in (select "my_column" from public.test) THEN
   RAISE EXCEPTION \'error: my_column[] --> test.my_column \';
   END IF;
END LOOP;
RETURN NEW;
END;'
 LANGUAGE 'plpgsql' VOLATILE;
--
CREATE TRIGGER t_ref_test
 BEFORE INSERT OR UPDATE
 ON public.ref_test
 FOR EACH ROW
 EXECUTE PROCEDURE public."t-f_ref_test"();
--
insert into test values (' here \"some_text\" ');
--
insert into ref_test values (' {here \"some_text\"} ');
But  here  postgres answers:  error: my_column[] --> test.my_column.
So I think this exception should not appear here and this is bug.
Instead I can only insert:
--
insert into ref_test values (' {here \\"some_text\\"} ');   -- but 
this is not exactly that i want to have.
--
Without "" in row of public.test - all works fine, but its important for 
me to use "" in my templates (database public.test).

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
 subscribe-nomail command to [EMAIL PROTECTED] so that your
 message can get through to the mailing list cleanly


Re: [BUGS] bug in 7.4.2, with Handling of Double Quotation Marks

2004-04-05 Thread Stephan Szabo

On Wed, 31 Mar 2004, Alexander S wrote:

> Bug in 7.4.2.. Concern with handling of Double  Quotation Marks (").
> Escape of  double quotation marks can't solve the problem.
>
> --
> CREATE TABLE public.test
> (
>   my_column varchar NOT NULL,
>   CONSTRAINT my_primary PRIMARY KEY (my_column)
> ) WITHOUT OIDS;
> ---
> CREATE TABLE public.ref_test
> (
>   my_column varchar[]
> ) WITH OIDS;
> ---
> CREATE FUNCTION public."t-f_ref_test"()
> RETURNS trigger AS
> 'BEGIN
> FOR i IN 1..30 LOOP
> IF NEW."my_column"[i] not in (select "my_column" from public.test) THEN
> RAISE EXCEPTION \'error: my_column[] --> test.my_column \';
> END IF;
> END LOOP;
> RETURN NEW;
> END;'
>   LANGUAGE 'plpgsql' VOLATILE;
> --
> CREATE TRIGGER t_ref_test
>   BEFORE INSERT OR UPDATE
>   ON public.ref_test
>   FOR EACH ROW
>   EXECUTE PROCEDURE public."t-f_ref_test"();
> --
> insert into test values (' here \"some_text\" ');
> --
> insert into ref_test values (' {here \"some_text\"} ');
>
> But  here  postgres answers:  error: my_column[] --> test.my_column.
> So I think this exception should not appear here and this is bug.
> Instead I can only insert:
> --
> insert into ref_test values (' {here \\"some_text\\"} ');   -- but
> this is not exactly that i want to have.

What is the specific problem you're having, is it needing the double
backslashes on insert? is it the output format backslash escaping
quotation marks?


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [BUGS] bug in 7.4.2, with Handling of Double Quotation Marks

2004-04-05 Thread Tom Lane
Alexander S <[EMAIL PROTECTED]> writes:
> Instead I can only insert:
> insert into ref_test values (' {here \\"some_text\\"} ');   -- but 
> this is not exactly that i want to have.

Unfortunately, that is what the syntax of array literals requires you to
say.

You might find it easier to work with the ARRAY[] constructor syntax.

regards, tom lane

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]