dbTalk Databases Forums  

[BUGS] ecpg c++ scope operator lost

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] ecpg c++ scope operator lost in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark Pether
 
Posts: n/a

Default [BUGS] ecpg c++ scope operator lost - 12-19-2003 , 11:47 AM






Ecpg pretty prints my code causing compile errors.

ie. code to compile:

EXEC SQL BEGIN DECLARE SECTION;
char bound_waiting_state =
static_cast<char>(Processor::waiting);
EXEC SQL END DECLARE SECTION;

turns into:

/* exec sql begin declare section */
#line 90 "Schedule.pgcc"
char bound_waiting_state = static_cast < char > ( Processor : :
waiting ) ;
/* exec sql end declare section */
#line 93 "Schedule.pgcc"

The scope operator becomes space padded and compiler barfs.

Work around is to initialise variables outside of declare section.

Regards,
Mark Pether.




---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

Reply With Quote
  #2  
Old   
Mark Pether
 
Posts: n/a

Default Re: [BUGS] ecpg c++ scope operator lost - 12-22-2003 , 10:38 AM






If that's the case then you'd better change your documentation...


PostgreSQL 7.3 Documentation

Chapter 4. ECPG - Embedded SQL in C
This chapter describes the embedded SQL package for PostgreSQL. It works
with C and *C++.* It was written by Linus Tolke (<linus (AT) epact (DOT) se
<mailto:linus (AT) epact (DOT) se>>) and Michael Meskes (<meskes (AT) postgresql (DOT) org
<mailto:meskes (AT) postgresql (DOT) org>>).


Regards,
Mark Pether.


Michael Meskes wrote:

Quote:
On Wed, Dec 17, 2003 at 03:14:31PM -0500, Mark Pether wrote:


Ecpg pretty prints my code causing compile errors.



Please note that ecpg is a precompiler for embedded SQL in C not C++.

Michael




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

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


Reply With Quote
  #3  
Old   
Michael Meskes
 
Posts: n/a

Default Re: [BUGS] ecpg c++ scope operator lost - 12-22-2003 , 02:29 PM



On Mon, Dec 22, 2003 at 09:33:00AM -0500, Mark Pether wrote:
Quote:
If that's the case then you'd better change your documentation...


PostgreSQL 7.3 Documentation

Chapter 4. ECPG - Embedded SQL in C
This chapter describes the embedded SQL package for PostgreSQL. It works
with C and *C++.* It was written by Linus Tolke (<linus (AT) epact (DOT) se
...
Please note that ecpg is a precompiler for embedded SQL in C not C++.
Sorry, I didn't know the docs say that. Actually we did add some C++
stuff, so if you can send me a list of what doesn't work I will add this
to the ecpg todo list, but I wouldn't say we guarantee that all C++
constructs work with ecpg.

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

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


Reply With Quote
  #4  
Old   
Michael Meskes
 
Posts: n/a

Default Re: [BUGS] ecpg c++ scope operator lost - 12-26-2003 , 02:04 PM



On Mon, Dec 22, 2003 at 09:33:00AM -0500, Mark Pether wrote:
Quote:
If that's the case then you'd better change your documentation...
Fixed. Thanks for pointing me to this.

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

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

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


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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.