Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id RAA18386 for postgres-dist; Wed, 23 Mar 1994 17:42:26 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199403240142.RAA18386@nobozo.CS.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from faerie.CS.Berkeley.EDU (faerie.CS.Berkeley.EDU [128.32.149.14]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id RAA18377 for <postgres@postgres.Berkeley.EDU>; Wed, 23 Mar 1994 17:42:25 -0800
Received: from localhost (localhost [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.6.4/8.1B) with SMTP id RAA01799; Wed, 23 Mar 1994 17:42:16 -0800
Message-Id: <199403240142.RAA01799@faerie.CS.Berkeley.EDU>
X-Authentication-Warning: faerie.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
From: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
To: perera@gis.lislab.uga.edu (Niranjan Perera)
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: ?
Reply-To: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
In-reply-to: Your message of Sat, 12 Mar 94 08:05:40 EST 
	     <9403121305.AA12316@gis.lislab.uga.edu> 
Date: Wed, 23 Mar 94 17:42:16 -0800
X-Sender: aoki@postgres.Berkeley.EDU
Resent-To: postgres-dist@postgres.Berkeley.EDU
X-Mts: smtp
Resent-Date: Wed, 23 Mar 94 17:42:26 -0800
Resent-XMts: smtp

perera@gis.lislab.uga.edu (Niranjan Perera) writes:
> I am trying to interface a program to the postgres backend. I am using
> flex, bison, libpq, and gcc 2.5.8.

1. postgres already has its own yyparse, etc. for its own grammar.
defining your own parser with default symbol names causes symbol 
conflicts.  find out how your lexer/yaccer let you avoid defining 
symbols starting in "yy".

2. libpq isn't supposed to be used in backend functions.  the current
release of postgres gives you something like the PQexec/portal 
interface but (1) you don't link in libpq, stubs are provided in the
backend, and (2) its use is somewhat problematic inasmuch as all
PQexecs are executed as subcommands in the same transaction.  this
has memory management (exhaustion) implications as well as the
obvious transaction-related implications.

3. don't use gcc for user-defined functions on sparcs.  postgres
makes some assumptions about alignment of doubles that the sun 
compiler lets slide but gcc does not.  (if you don't use doubles,
it's not a problem, but if you do, you may end up with bus errors.)
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  aoki@postgres.Berkeley.EDU
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki
