[pgadmin-support] Reverse engineered Column definition incorrect for DEFAULT

2003-10-02 Thread Donald Fraser



The reverse engineered code for column definitions 
if incorrect for DEFAULT values.
I create table such as:
 
REATE TABLE public.tbl_bkgndata(  id 
int4 NOT NULL DEFAULT nextval('tbl_bkgndata_id_seq'::text),) WITHOUT 
OIDS;
 
Reverse engineered column definition 
is:
 
ALTER TABLE public.tbl_bkgndata ADD COLUMN id 
int4;ALTER TABLE public.tbl_bkgndata ALTER COLUMN id SET STORAGE 
PLAIN;ALTER TABLE public.tbl_bkgndata ALTER COLUMN id SET NOT NULL;ALTER 
TABLE public.tbl_bkgndata ALTER COLUMN id DEFAULT 
nextval('tbl_bkgndata_id_seq'::text);
 
Last row should read:
ALTER TABLE public.tbl_bkgndata ALTER COLUMN id SET 
DEFAULT nextval('tbl_bkgndata_id_seq'::text);
 
That is the key word SET is missing.
 
Regards
Donald Fraser.


Re: [pgadmin-support] Reverse engineered Column definition incorrect

2003-10-02 Thread Andreas Pflug
Donald Fraser wrote:

The reverse engineered code for column definitions if incorrect for 
DEFAULT values.
I create table such as:
 
REATE TABLE public.tbl_bkgndata
(
  id int4 NOT NULL DEFAULT nextval('tbl_bkgndata_id_seq'::text),
) WITHOUT OIDS;
 
Reverse engineered column definition is:
 
ALTER TABLE public.tbl_bkgndata ADD COLUMN id int4;
ALTER TABLE public.tbl_bkgndata ALTER COLUMN id SET STORAGE PLAIN;
ALTER TABLE public.tbl_bkgndata ALTER COLUMN id SET NOT NULL;
ALTER TABLE public.tbl_bkgndata ALTER COLUMN id DEFAULT 
nextval('tbl_bkgndata_id_seq'::text);
 
Last row should read:
ALTER TABLE public.tbl_bkgndata ALTER COLUMN id SET DEFAULT 
nextval('tbl_bkgndata_id_seq'::text);
 
That is the key word SET is missing.


Fixed in cvs, thanks for reporting.

Regards,
Andreas


---(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


[pgadmin-support] Bug in pgadmin III displaying/exporting data from query window(tr uncating)

2003-10-02 Thread Godshall Michael



Hi,
 
I am running version 
1.0.0, Win2k, english version, and postgresql 7.3.4 under cygwin.  

 
In the 
File->Options->Query->max. characters per column I have changed the 
default to 5000 characters.  When I run a query in a pgadminIII the columns 
that I have defined as text stop displaying data after 511 
characters.
 
If I choose to 
export the data from the query screen the data in for my text columns is also 
truncated at 511 characters.
 
If I use postgresql 
copy command in pgadminIII window to export the data to a file then the data is 
not truncated.
 
I have tried closing 
out pgadminIII and re-opening but the data is still 
truncated.
Michael GodshallGMAC Global Relocation 
Services[EMAIL PROTECTED] 

 


Re: [pgadmin-support] Bug in pgadmin III displaying/exporting data

2003-10-02 Thread Andreas Pflug
Godshall Michael wrote:

Hi,
 
I am running version 1.0.0, Win2k, english version, and postgresql 
7.3.4 under cygwin. 
 
In the File->Options->Query->max. characters per column I have changed 
the default to 5000 characters.  When I run a query in a pgadminIII 
the columns that I have defined as text stop displaying data after 511 
characters.
 
If I choose to export the data from the query screen the data in for 
my text columns is also truncated at 511 characters.

If I use postgresql copy command in pgadminIII window to export the 
data to a file then the data is not truncated.
Bad news... If max chars per column is defined, a truncation performed 
by pgAdmin3 is visualized by appended " (..)". It seems that the 
listview isn't able to display more than 511 chars, this might be win32 
specific (use linux... :-), or a restriction of wx (we'd fix this)

I'll check this; if win32 is guilty (I believe so) we're stuck. It must 
be quite hard to display this anyway, lot of scrolling necessary...
In this case, I'd suggest to export the data and use an editor, 
obviously you already did so.

Regards,
Andreas


 
I have tried closing out pgadminIII and re-opening but the data is 
still truncated.

Michael Godshall
GMAC Global Relocation Services 
[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


Re: [pgadmin-support] Bug in pgadmin III displaying/exporting dat

2003-10-02 Thread Godshall Michael
Title: RE: [pgadmin-support] Bug in pgadmin III displaying/exporting data from query window(tr	uncating)





Ok,


In pgadminII I could choose to output the results directly to a text file without having them first displayed on the screen.  That is what I was really trying to do(I normally don't try to read the 5000 characters in the pgadmin window). 

Is their a way to do this in pgadminIII without first having it try to display the data?


I guess I can insert my select * from X into a temp table and then use the postgresql copy command to export the temp table into a text file.  It just is a little more work than just selecting the output to text from the drop down box.

I use linux at home and would test it there if I can get pgadminIII installed on it.  Last time I tried it failed because I did not have ssl and crypto so.4 libraries.  My Redhat 8.0 box has versions so.2.  Maybe I downloaded the wrong version of pgadminIII.

Thanks for the response.


Mike
-Original Message-
From: Andreas Pflug [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 02, 2003 4:04 PM
To: Godshall Michael
Cc: '[EMAIL PROTECTED]'
Subject: Re: [pgadmin-support] Bug in pgadmin III displaying/exporting
data from query window(tr uncating)



Godshall Michael wrote:


> Hi,
>  
> I am running version 1.0.0, Win2k, english version, and postgresql 
> 7.3.4 under cygwin. 
>  
> In the File->Options->Query->max. characters per column I have changed 
> the default to 5000 characters.  When I run a query in a pgadminIII 
> the columns that I have defined as text stop displaying data after 511 
> characters.
>  
> If I choose to export the data from the query screen the data in for 
> my text columns is also truncated at 511 characters.


> If I use postgresql copy command in pgadminIII window to export the 
> data to a file then the data is not truncated.


Bad news... If max chars per column is defined, a truncation performed 
by pgAdmin3 is visualized by appended " (..)". It seems that the 
listview isn't able to display more than 511 chars, this might be win32 
specific (use linux... :-), or a restriction of wx (we'd fix this)


I'll check this; if win32 is guilty (I believe so) we're stuck. It must 
be quite hard to display this anyway, lot of scrolling necessary...
In this case, I'd suggest to export the data and use an editor, 
obviously you already did so.


Regards,
Andreas




>  
> I have tried closing out pgadminIII and re-opening but the data is 
> still truncated.
>
> Michael Godshall
> GMAC Global Relocation Services 
>
> [EMAIL PROTECTED] 
>
>  







[pgadmin-support] Default value for char/varchar columns is not quoted automaticaly

2003-10-02 Thread Oldrich Dlouhy
Default value for char/varchar columns is not quoted automaticaly when 
creating a table or adding new column to existing table.

-- PGAdmin --

version: PGAdmin III version 1.0.0
OS:  Windows XP Professional SP1
-- postgres --

Postgres: 7.3.4 on i686-pc-linux-gnu
OS:   RedHat Linux 9
- Steps to reproduce --

1.Add a new column of (var)char type to existing table with column's 
default value "test value" (withou the quotes)

-- Current result --

Column is not added (parse error)

-- Expected result --

New column is added

-- Notes --

Same behavior is when creating the table.

If this behavior is "by design" and the user required to enter the 
quotes manualy, take it please just as a feature request to automaticaly 
quote character-type defaults

Thank you for creating great tool as PGAdmin is.
Hope this will help you to improve PGAdmin.
Oldrich Dlouhy

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


Re: [pgadmin-support] Reverse engineered Column definition incorrect for DEFAULT

2003-10-02 Thread Hiroshi Saito
Dear Donald.

Thank you very much.
It will be reflected soon.

Dave Apply it?

- Original Message - 
From: Donald Fraser 

> The reverse engineered code for column definitions if incorrect for DEFAULT values.
> I create table such as:

(snip)
> ALTER TABLE public.tbl_bkgndata ALTER COLUMN id DEFAULT 
> nextval('tbl_bkgndata_id_seq'::text);
> 
> Last row should read:
> ALTER TABLE public.tbl_bkgndata ALTER COLUMN id SET DEFAULT 
> nextval('tbl_bkgndata_id_seq'::text);
>
> That is the key word SET is missing.


pgColumn_patch
Description: Binary data

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