In my database I have several references between tables.
When webifying an insert form it seemed to me that these
would best be represented as a selection list.
Currently I'm using this:
SQL: select t.tgargs from pg_class c, pg_trigger
where t.tgrelid = c.oid and c.relname='mytable';
returns values like this:
PHP: record = split on '\000';
when record matches mytable:
[If it doesn't match mytable, then this table is being referenced as
opposed to referencing]
SQL: select record from record;
PHP: construct selection list from the returned list
Question: Is \000 an official separator between targs fields or is
000 part of a number that may change for some reason?
Also -- is this the best way to solve my problem? It seems a little
inelegant to perform the middle split and match in the calling script, but I
can't figure out how to do it in SQL (tgargs is type bytea which doesn't
respond to regex operators.... What is a bytea anyhow?)
Last question -- Is there any documentation of the system tables (pg_*)?
I've found several useful fields in several tables, but I'm far from
understanding most of what's in there.
badger \ "I sometimes wonder: where is it all going?
@prtr-13 \ Which makes me stop to wonder: what is it?"
pgsql-php by date
|Next:||From: JeffK||Date: 2000-12-16 09:54:31|
|Subject: haveing trouble to put php, apache and phpPgAdmin together....|
|Previous:||From: Hervé Piedvache||Date: 2000-12-13 11:40:26|
|Subject: Re: pg_pconnect - Really persistent ?|