pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nombre y Apellidos <100000450@alumnos.uc3m.es>
To: pgsql-interfaces@postgresql.org
Subject: Internet
Date: Tue, 18 Jan 2000 17:35:37 -0500
Message-ID: <200001181634.RAA10000@alumnos.uc3m.es> (raw)

Michael Meskes:
> On Wed, Jan 12, 2000 at 07:10:57PM -0500, Nombre y Apellidos wrote:
> > In my program in C with embedded SQL, I am trying to use a cursor for
> > a query. 
> > The new syntax of FETCH is :
> > EXEC SQL FETCH FROM cursor_name INTO :variable_name
> > 
> > But I receive the following message of error when I execute my program:
> > 	Segmentation default 
> 
> Ouch. Segmentation fault means the program tries to access invalid memory.
> You can get it for instance if the variable is not correctly defined.
> 
> > When I worked with a previous version I wrote:
> > EXEC SQL FETCH cursor_name INTO :variable_name
> 
> Yes, this syntax was supported and may be supported again in the future.
> Right now our parser does not like it due to shift/reduce conflicts. But I'm
> working on it.
> 
> > What is the correct syntax?
> 
> Using FROM is and will be correct.
> 
> > How can I use the command FETCH?
> 
> The above mentioned statement ie correct given that you did declare the
> cursor in advance. Please check the test file in the source tree for some
> examples.
> 
> > Is always neccessary to include the embedded SQL commands in 
> > transaction blocks?
> 
> Yes and No. It depends on what you mean exactly. ECPG by default starts a
> transaction every time the connection starts resp. the open transcation is
> committed or rolled back.
> 
> What you can do is start ecpg with option '-t' or issue an exec sql set
> autocommit=on to disable that feature. Then you have to manually start a
> transaction if you need one. However, you cannot work without a transaction
> since the backend executes statements only if they are embedded in a
> transaction. If you do not have an open transaction the backend will start
> one prior to executing your command and immediately after finishing this
> transaction will be committed.
> 
> Hope this helps.
> 
> Michael
> -- 
> Michael Meskes                         | Go SF 49ers!
> Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
> Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
> Email: Michael@Fam-Meskes.De           | Use PostgreSQL!
> 
I am Ana Isabel Canales from Spain, Universidad Carlos III of Madrid.
I received your email answering my problems with ecpg.
Thanks for your answer because it was very useful for me. I am working in my end of studies project of Industrial Engineering. 
My project is about a database applied to a flexible manufacturing cell, and I am working with PostgreSQL.
It would be very useful for me to have communication with the PostgreSQL Team because I am having some difficulties.
Perhaps, you can´t help me, but I would like to know how I can connect and access my database from the Internet.
I want to connect my database with a HTML page.
What is the easier form to connect my database from Netscape for example?
I´ve heard something about apache and php, but I am trying it and it doesn´t work.
Can you help me?

Thanks for all.

 

Message-ID: <200001181634.RAA10000@alumnos.uc3m.es>
Permalink:  ../200001181634.RAA10000@alumnos.uc3m.es/
Also on:    postgresql.org/message-id/200001181634.RAA10000@alumnos.uc3m.es

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-interfaces@postgresql.org
  Cc: 100000450@alumnos.uc3m.es
  Subject: Re: Internet
  In-Reply-To: <200001181634.RAA10000@alumnos.uc3m.es>
  References: <200001181634.RAA10000@alumnos.uc3m.es>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox