Thread: two bugs?

two bugs?

From
"Rodríguez Rodríguez, Pere"
Date:
<p><font face="Arial" size="2">Hello,</font><p><font face="Arial" size="2">I run pgAdmin III version 1.0.2 (Nov 28
2003)for windows and it work very well except in two situations.</font><p><font face="Arial" size="2">1.- When I have a
tablewith a text data type column and I want to change this data type to varchar then I can enter varchar data type but
Ican't enter data length because length text box is disabled.</font><p><font face="Arial" size="2">2.- Scripts
generatedfor a tables with check constraints don't have parentheses for the check expression. For example, for this
table:</font><p><fontface="Arial" size="2">CREATE TABLE public.llocs_treball<br /> (<br /> ...<br /> activitat_enfestiu
varchar(1)DEFAULT 'N'::character varying,<br /> ....<br /> CONSTRAINT llocs_treball_activitat_enfestiu CHECK (
activitat_enfestiu='S'OR activitat_enfestiu='N' ),<br /> ....<br /> ) WITHOUT OIDS;</font><br /><font face="Arial"
size="2">thepgAdmin generated script is:</font><br /><font face="Arial" size="2">CREATE TABLE public.llocs_treball<br
/>(<br /> ...<br /> activitat_enfestiu varchar(1) DEFAULT 'N'::character varying,<br /> ...<br /> CONSTRAINT
llocs_treball_activitat_enfestiuCHECK activitat_enfestiu::text = 'S'::text OR activitat_enfestiu::text = 'N'::text,<br
/>...<br /> ) WITHOUT OIDS;</font><p><font face="Arial" size="2">Platform:<br />    - pgAdmin III: Windows NT
workstation(service pack 6)<br />    - PostgreSQL: Linux miramar 2.6.5 #1 Thu May 27 17:40:27 CEST 2004 i686 GNU/Linux
(DebianSarge)</font><br /><font face="Arial" size="2">Language: Spanish</font><br /><font face="Arial"
size="2">Distribution:<br/>    - pgAdmin III: version 1.0.2 (Nov 28 2003). Packages for MS Windows 2000/XP<br />    -
PostgreSQL:PostgreSQL 7.4.2 on i386-pc-linux-gnu, compiled by GCC i386-linux-gcc (GCC) 3.3.3 (Debian
20040401)</font><br/><font face="Arial" size="2">Thanks in advance,</font><p><font face="Arial" size="2">Pere
Rodríguez<br/> Dpt. d'Informàtica<br /> Hospital de Palamós<br /> Girona - Spain</font> 

Re: two bugs?

From
Andreas Pflug
Date:
Rodríguez Rodríguez, Pere wrote:

> 
> 1.- When I have a table with a text data type column and I want to 
> change this data type to varchar then I can enter varchar data type but 
> I can't enter data length because length text box is disabled.

It's not a bug, it's a feature: text has unlimited length, and pgadmin3 
won't allow you to decrease the length. You can go from varchar(5) to 
varchar(10) or varchar or text, but not varchar(4)

> 
> 2.- Scripts generated for a tables with check constraints don't have 
> parentheses for the check expression. For example, for this table:

AFAIR this is fixed in CVS, please check a snapshot version.

Regards,
Andreas


Re: two bugs?

From
"Rodríguez Rodríguez, Pere"
Date:
<p><font size="2">>> 1.- When I have a table with a text data type column and I want to </font><br /><font
size="2">>>change this data type to varchar then I can enter varchar data type but </font><br /><font
size="2">>>I can't enter data length because length text box is disabled.</font><br /><font
size="2">></font><br/><font size="2">>It's not a bug, it's a feature: text has unlimited length, and pgadmin3
</font><br/><font size="2">>won't allow you to decrease the length. You can go from varchar(5) to </font><br /><font
size="2">>varchar(10)or varchar or text, but not varchar(4)</font><p><font size="2">I'm agree but pgAdmin3 could
allowmodify it when there aren't any rows, or if there are some row then pgAdmin3 could allow modify and then validate
thenew data type and the data in the table. I supouse that the second option is dificult, but is the first option
possible?</font><p><fontsize="2">>> </font><br /><font size="2">>> 2.- Scripts generated for a tables with
checkconstraints don't have </font><br /><font size="2">>> parentheses for the check expression. For example, for
thistable:</font><br /><font size="2">></font><br /><font size="2">>AFAIR this is fixed in CVS, please check a
snapshotversion.</font><p><font size="2">Tanks very much, I tested 1.1.0 Devel snapshot version and it works
fine.</font><p><fontsize="2">Thanks in advance, </font><p><font size="2">Pere Rodríguez</font><br /><font size="2">Dpt.
d'Informàtica</font><br/><font size="2">Hospital de Palamós</font><br /><font size="2">Girona - Spain </font> 

Re: two bugs?

From
Andreas Pflug
Date:
Rodríguez Rodríguez, Pere wrote:

> 
> I'm agree but pgAdmin3 could allow modify it when there aren't any rows, 
> or if there are some row then pgAdmin3 could allow modify and then 
> validate the new data type and the data in the table. I supouse that the 
> second option is dificult, but is the first option possible?

Too much stuff that actually the database should do. It's not a good 
idea to try to simulate server side constraints on the client. It's much 
effort for less effect, while we still have many high-priority stuff to do.
BTW, 7.5 *does* alter column types now by sql.

Regards,
Andreas


Compiling pgadmin on SuSE 9.1

From
Michael.Eschweiler@t-online.de (Michael Eschweiler)
Date:
Hello,

I'm trying to compile pgadmin3-1.0.2 on SuSE 9.1. When I run ./configure I got 
the error message: "configure: error: you must specify a valid pgsql 
installation with --with-pgsql=DIR". Then I tried to do ./configure with 
several directories but I always got the same error-messages. Is there 
somebody who knows which exactly is the pgsql-directory on SuSE 9.1 and how 
is the correct syntax to hand over it to configure?

Thanks in advance,
Michael



Re: Compiling pgadmin on SuSE 9.1

From
Adam H.Pendleton
Date:
On Aug 1, 2004, at 7:26 AM, Michael Eschweiler wrote:

> Hello,
>
> I'm trying to compile pgadmin3-1.0.2 on SuSE 9.1. When I run 
> ./configure I got
> the error message: "configure: error: you must specify a valid pgsql
> installation with --with-pgsql=DIR". Then I tried to do ./configure 
> with
> several directories but I always got the same error-messages. Is there
> somebody who knows which exactly is the pgsql-directory on SuSE 9.1 
> and how
> is the correct syntax to hand over it to configure?
>

Please submit your config.log file, to assist us in debugging this 
problem.

ahp



Re: Compiling pgadmin on SuSE 9.1

From
Michael.Eschweiler@t-online.de (Michael Eschweiler)
Date:
Am Montag, 2. August 2004 14:17 schrieben Sie:
> On Aug 1, 2004, at 7:26 AM, Michael Eschweiler wrote:
> > Hello,
> >
> > I'm trying to compile pgadmin3-1.0.2 on SuSE 9.1. When I run
> > ./configure I got
> > the error message: "configure: error: you must specify a valid pgsql
> > installation with --with-pgsql=DIR". Then I tried to do ./configure
> > with
> > several directories but I always got the same error-messages. Is there
> > somebody who knows which exactly is the pgsql-directory on SuSE 9.1
> > and how
> > is the correct syntax to hand over it to configure?
>
> Please submit your config.log file, to assist us in debugging this
> problem.
Sorry, here it comes...

>
> ahp
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html

Re: Compiling pgadmin on SuSE 9.1

From
Michael.Eschweiler@t-online.de (Michael Eschweiler)
Date:
Hi Adam

Am Mittwoch, 4. August 2004 14:39 schrieben Sie:
> On Aug 2, 2004, at 4:27 PM, Michael Eschweiler wrote:
> > Am Montag, 2. August 2004 14:17 schrieben Sie:
> >> On Aug 1, 2004, at 7:26 AM, Michael Eschweiler wrote:
> >>> Hello,
> >>>
> >>> I'm trying to compile pgadmin3-1.0.2 on SuSE 9.1. When I run
> >>> ./configure I got
> >>> the error message: "configure: error: you must specify a valid pgsql
> >>> installation with --with-pgsql=DIR". Then I tried to do ./configure
> >>> with
> >>> several directories but I always got the same error-messages. Is
> >>> there
> >>> somebody who knows which exactly is the pgsql-directory on SuSE 9.1
> >>> and how
> >>> is the correct syntax to hand over it to configure?
>
> It looks like you have some sort of permissions problem:
>
> configure:4655: result: no
> configure:4673: checking libpq-fe.h usability
> configure:4686: gcc -c -g -O2  -DSSL -I/var/lib/pgsql//include
> conftest.c >&5
> cc1: /var/lib/pgsql/include: Permission denied
>
> configure:4705: result: no
> configure:4709: checking libpq-fe.h presence
> configure:4720: gcc -E  -DSSL -I/var/lib/pgsql//include conftest.c
> cc1: /var/lib/pgsql/include: Permission denied

> Whatever user you are running configure as doesn't have read
> permissions into /var/lib/pgsql/include

With this hints I controlled the permissions and it seems that this is not the 
problem. All files are readable for ugo. Nevertheless I tried to configure as 
root but I got the same result. 
I then tried to configure doing
./configure --with-pgsql-include=/usr/include/pgsql  
--with-pgsql=/var/lib/pgsql (and others --with-pgsql= which as I supposed 
could serve, using always --with-pgsql-include=/usr/include/pgsql)
but I am always left with 'configure: error: you must specify a valid pgsql 
installation with --with-pgsql=DIR'
As I don't know what configure is looking for when it's 'checking for PQexec' 
and I read on the screen (above the last error-message): 'PQexec in -lpq ... 
no'
I tried to read the configure-file and the config.log-file but I must confess 
I could not find the answer. Attached once more the config.log.
Thanks in advance
Michael 
>
> ahp



Re: Compiling pgadmin on SuSE 9.1

From
Adam H.Pendleton
Date:
On Aug 4, 2004, at 3:52 PM, Michael Eschweiler wrote:
>
> I could not find the answer. Attached once more the config.log.

There wasn't anything attached to this e-mail.

In any event, the config.log I got before indicates a permissions 
problem.  When gcc is invoked, /var/lib/pgsql/include is passed as an 
include directory.  When gcc tries to read in that directory for 
include files, it cannot.  Make sure that, in addition to read 
permissions, that the user you are compiling as has execute permissions 
on the directory.  This is necessary to list files.

NOTE 2: It looks like your previous configure was run by user "me", not 
"ugo".

ahp



Re: Compiling pgadmin on SuSE 9.1

From
Adam H.Pendleton
Date:
On Aug 5, 2004, at 3:18 PM, Michael Eschweiler wrote:

> configure:4634: gcc -o conftest -g -O2  -DSSL -I/usr/include/pgsql
> -L/var/lib/pgsql/lib conftest.c -lpq   -lssl -lcrypto -lpq >&5
> /usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../../i586-suse-linux/ 
> bin/ld:
> cannot find -lssl
> collect2: ld returned 1 exit status

Here's your problem.  You don't have the ssl library, but configure  
expects it.  I submitted a patch to the list a few days ago fixing this  
problem.  If you don't have list traffic from then, let me know.

ahp



Re: Compiling pgadmin on SuSE 9.1

From
Michael.Eschweiler@t-online.de (Michael Eschweiler)
Date:
Am Donnerstag, 5. August 2004 23:33 schrieben Sie:
> On Aug 5, 2004, at 3:18 PM, Michael Eschweiler wrote:
> > configure:4634: gcc -o conftest -g -O2  -DSSL -I/usr/include/pgsql
> > -L/var/lib/pgsql/lib conftest.c -lpq   -lssl -lcrypto -lpq >&5
> > /usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../../i586-suse-linux/
> > bin/ld:
> > cannot find -lssl
> > collect2: ld returned 1 exit status
>
> Here's your problem.  You don't have the ssl library, but configure
> expects it.  I submitted a patch to the list a few days ago fixing this
> problem.  If you don't have list traffic from then, let me know.
>
> ahp

I subscribed to the list (since february 2004) so I searched the list but I 
didn't find any patch. (The only thing that looks like a patch was 
pgadmin3_1.0.2-0.1.diff.gz but this was not from you and I don't know what to 
do with this.)
Therefore I would appreciate if you could send it once more.

Michael

BTW: openssl is installed (and in use) 
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings