Unix Technical Forum

BUG #1962: ECPG and VARCHAR

This is a discussion on BUG #1962: ECPG and VARCHAR within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 1962 Logged by: Charles Wegrzyn Email address: lists@garbagedump.com PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 10:18 AM
Charles Wegrzyn
 
Posts: n/a
Default BUG #1962: ECPG and VARCHAR


The following bug has been logged online:

Bug reference: 1962
Logged by: Charles Wegrzyn
Email address: lists@garbagedump.com
PostgreSQL version: 8.0.4
Operating system: Linux : 2.6.13-r4
Description: ECPG and VARCHAR
Details:

I have code that under 8.0.3 works:

VARCHAR t[MAX_TENANT_SIZE+1];
VARCHAR o[MAX_OID_SIZE+1];

In 8.0.4 I found this throws an error during the ecpg step:

tenant.ec:375: ERROR: pointer to varchar are not implemented
tenant.ec:376: ERROR: pointer to varchar are not implemented

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 10:19 AM
Michael Fuhr
 
Posts: n/a
Default Re: BUG #1962: ECPG and VARCHAR

On Thu, Oct 13, 2005 at 02:24:27PM +0100, Charles Wegrzyn wrote:
> I have code that under 8.0.3 works:
>
> VARCHAR t[MAX_TENANT_SIZE+1];
> VARCHAR o[MAX_OID_SIZE+1];
>
> In 8.0.4 I found this throws an error during the ecpg step:
>
> tenant.ec:375: ERROR: pointer to varchar are not implemented
> tenant.ec:376: ERROR: pointer to varchar are not implemented


ecpg in 8.0.4 seems not to like the macros. I get the same error,
but not if I do this:

VARCHAR t[256];
VARCHAR o[256];

ecpg in 8.1beta3 works either way.

--
Michael Fuhr

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 10:19 AM
Michael Fuhr
 
Posts: n/a
Default Re: BUG #1962: ECPG and VARCHAR

On Thu, Oct 13, 2005 at 09:49:20AM -0600, Michael Fuhr wrote:
> ecpg in 8.0.4 seems not to like the macros. I get the same error,
> but not if I do this:
>
> VARCHAR t[256];
> VARCHAR o[256];
>
> ecpg in 8.1beta3 works either way.


This appears to be the guilty commit, which was made to 7.4, 8.0,
and HEAD (8.1):

http://archives.postgresql.org/pgsql...8/msg00266.php

It was recently fixed in HEAD only:

http://archives.postgresql.org/pgsql...0/msg00043.php

--
Michael Fuhr

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

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 10:19 AM
C Wegrzyn
 
Posts: n/a
Default Re: BUG #1962: ECPG and VARCHAR

Michael Fuhr wrote:

>On Thu, Oct 13, 2005 at 02:24:27PM +0100, Charles Wegrzyn wrote:
>
>
>>I have code that under 8.0.3 works:
>>
>> VARCHAR t[MAX_TENANT_SIZE+1];
>> VARCHAR o[MAX_OID_SIZE+1];
>>
>>In 8.0.4 I found this throws an error during the ecpg step:
>>
>>tenant.ec:375: ERROR: pointer to varchar are not implemented
>>tenant.ec:376: ERROR: pointer to varchar are not implemented
>>
>>

>
>ecpg in 8.0.4 seems not to like the macros. I get the same error,
>but not if I do this:
>
> VARCHAR t[256];
> VARCHAR o[256];
>
>ecpg in 8.1beta3 works either way.
>
>
>

Michael,

Yes I found out the same thing. Unfortunately it isn't quite that
simple for me. It isn't a very good idea to hard-code fixed sizes in
executables. I have a file with all sorts of #defines in it. If the bug
doesn't get fixed it means that I will need to run CPP over the code
before I run ecpg, which is just ugly.

Chuck Wegrzyn


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-10-2008, 10:19 AM
C Wegrzyn
 
Posts: n/a
Default Re: BUG #1962: ECPG and VARCHAR

The customer I am writing this for will only accept it based on released
code. That means I run either 8.0.3 or 8.0.4.

Chuck

Michael Meskes wrote:

>On Thu, Oct 13, 2005 at 11:18:13AM -0500, C Wegrzyn wrote:
>
>
>> Yes I found out the same thing. Unfortunately it isn't quite that
>>simple for me. It isn't a very good idea to hard-code fixed sizes in
>>executables. I have a file with all sorts of #defines in it. If the bug
>>doesn't get fixed it means that I will need to run CPP over the code
>>before I run ecpg, which is just ugly.
>>
>>

>
>Can't you just compile a new version of ecpg with the patch Bruce
>committed? Depending on the system you're using I could even send you a
>binary.
>
>Michael
>
>



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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-10-2008, 10:20 AM
Michael Meskes
 
Posts: n/a
Default Re: BUG #1962: ECPG and VARCHAR

Am Freitag, 14. Oktober 2005 21:15 schrieb C Wegrzyn:
> The customer I am writing this for will only accept it based on released
> code. That means I run either 8.0.3 or 8.0.4.


Would it help you if I do a special ecpg release just for you? Or does it have
to be part of the postgres release?

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com