dynamic #include's?

From: "Mark McArthey" <mcarthey(at)execpc(dot)com>
To: "PgSQL Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: dynamic #include's?
Date: 2001-10-23 17:36:28
Message-ID: CGEFKOCNLBFDGLJODOGIKEJCCDAA.mcarthey@execpc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I have an idea for creating a Perl script, but I just wanted to make sure
that no one has already created something similar.
When doing a full row select, it's necessary to create all the bind
variables, and then do a column by column select statement. Ugly if there's
a lot of columns. I want to automagically create an include that I would be
able to place in the DECLARE SECTION and also use in the SELECT statements.
For example:
EXEC SQL BEGIN DECLARE SECTION;
#include "player_def.h"
EXEC SQL END DECLARE SECTION;

The #include'd file would contain the bind variables that were gathered from
the database.

Additionally, we should be able to do something like this:

EXEC SQL SELECT
#include "player_sel.h"
INTO
#include "player_bind.h"
WHERE
name = 'blah';

All of these methods are based upon my prior experience with embedded sql,
so if Postgres has a better method, or something new has come up, please let
me know.
Thanks!
Mark

Browse pgsql-novice by date

  From Date Subject
Next Message Travis Hoyt 2001-10-23 19:11:51 [Fwd: views, with check option]
Previous Message Josh Berkus 2001-10-23 16:51:17 Re: Concatenating strings