dynamic #include's? - Mailing list pgsql-novice

From Mark McArthey
Subject dynamic #include's?
Date
Msg-id CGEFKOCNLBFDGLJODOGIKEJCCDAA.mcarthey@execpc.com
Whole thread Raw
List 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



pgsql-novice by date:

Previous
From: "Travis Hoyt"
Date:
Subject: [Fwd: views, with check option]
Next
From: "Mark McArthey"
Date:
Subject: column length?