Skip site navigation (1) Skip section navigation (2)

Porting embedded SQL from Oracle to Postgres

From: "Daniel Clayton" <dwbc(at)hotmail(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Porting embedded SQL from Oracle to Postgres
Date: 2005-10-09 21:57:37
Message-ID: BAY21-F2D31A3ACF54022DE3EA72DD860@phx.gbl (view raw or flat)
Thread:
Lists: pgsql-interfaces
I am getting an error when attempting to compile using ecpg.

ERROR: syntax error at or near "TYPE"

This code was originally written for Oracle using Pro*/C

from header:

#define RAW_BUFFER_SIZE 524287
typedef struct {
    long len;
    char buffer[RAW_BUFFER_SIZE];
} internalCompiledData_t;

from .pgc :

EXEC SQL TYPE internalCompiledData_t is LONG VARRAW(RAW_BUFFER_SIZE);

static internalCompiledData_t compiledData;



It appears that the syntax EXEC SQL TYPE .. is ... ; is Oracle specific, is 
there a matching syntax for ecpg?
Or possibly a different way to achieve this datatype equivalencing?

Thanks in advance.
Daniel.

_________________________________________________________________
Find the coolest online games @ http://xtramsn.co.nz/gaming


Responses

pgsql-interfaces by date

Next:From: Michael FuhrDate: 2005-10-10 00:54:59
Subject: Re: Porting embedded SQL from Oracle to Postgres
Previous:From: Zlatko MatićDate: 2005-10-05 20:33:01
Subject: Re: [INTERFACES] [ODBC] Unbound text box, Text > 255 characters, MSAccess/PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group