Erwin Moller wrote:
No, that is not the kind of chicken I was talking about. ;-)
My chicken is more along these lines:
I often have some tables to which everything is related (eg tblcourse
that contains everything belonging to a certain course).
I don't want to make a single simple mistake
Craig Ringer schreef:
Erwin Moller wrote:
No, that is not the kind of chicken I was talking about. ;-)
My chicken is more along these lines:
I often have some tables to which everything is related (eg tblcourse
that contains everything belonging to a certain course).
I don't want to make a
Hi Pavel,
Thanks for that.
But I already wrote a nice extension to my DB-class in PHP that uses
Thomas Kellerer's approach.
It was simple once you know how to retrieve the info from the
systemtables. :-)
Regards,
Erwin Moller
Pavel Stehule schreef:
Hello
I used this code
CREATE OR
Erwin Moller schreef:
Craig Ringer schreef:
Erwin Moller wrote:
No, that is not the kind of chicken I was talking about. ;-)
My chicken is more along these lines:
I often have some tables to which everything is related (eg
tblcourse that contains everything belonging to a certain course).
I
Hi group,
Considering following (simplified) example:
CREATE TABLE tblnr1(
nr1id SERIAL PRIMARY KEY,
firstname TEXT
);
CREATE TABLE tblnr2(
nr2id SERIAL PRIMARY KEY,
nr1id INTEGER REFERENCES tblnr1(nr1id)
);
CREATE TABLE tblnr3(
nr3id SERIAL PRIMARY KEY,
nr2id INTEGER REFERENCES
On Nov 18, 2008, at 9:47 AM, Erwin Moller wrote:
Hi group,
Considering following (simplified) example:
CREATE TABLE tblnr1(
nr1id SERIAL PRIMARY KEY,
firstname TEXT
);
CREATE TABLE tblnr2(
nr2id SERIAL PRIMARY KEY,
nr1id INTEGER REFERENCES tblnr1(nr1id)
);
CREATE TABLE tblnr3(
nr3id SERIAL
Erwin Moller, 18.11.2008 15:47:
Suppose I want to delete a record in tblnr1.
Does Postgres has some command/procedure/function to list tables that
have FK constraints on that table (tblnr1)
That could be resolved with a query against the INFORMATION_SCHEMA
Something like
SELECT c.table_name
ries van Twisk schreef:
On Nov 18, 2008, at 9:47 AM, Erwin Moller wrote:
Hi group,
Considering following (simplified) example:
CREATE TABLE tblnr1(
nr1id SERIAL PRIMARY KEY,
firstname TEXT
);
CREATE TABLE tblnr2(
nr2id SERIAL PRIMARY KEY,
nr1id INTEGER REFERENCES tblnr1(nr1id)
);
CREATE
Thomas Kellerer schreef:
Erwin Moller, 18.11.2008 15:47:
Suppose I want to delete a record in tblnr1.
Does Postgres has some command/procedure/function to list tables that
have FK constraints on that table (tblnr1)
That could be resolved with a query against the INFORMATION_SCHEMA
Something
ries van Twisk wrote:
On Nov 18, 2008, at 9:47 AM, Erwin Moller wrote:
Hi group,
Considering following (simplified) example:
snip
Suppose I want to delete a record in tblnr1.
Does Postgres has some command/procedure/function to list tables that
have FK constraints on that table (tblnr1)
Shane Ambler schreef:
ries van Twisk wrote:
On Nov 18, 2008, at 9:47 AM, Erwin Moller wrote:
Hi group,
Considering following (simplified) example:
snip
Suppose I want to delete a record in tblnr1.
Does Postgres has some command/procedure/function to list tables
that have FK constraints
Hello
I used this code
CREATE OR REPLACE FUNCTION list_user_tables_sort_depend
(owner VARCHAR, revers BOOLEAN) RETURNS SETOF VARCHAR AS '
DECLARE tabulky VARCHAR[]; i INTEGER; opakovat BOOLEAN = ''t'';
pom VARCHAR; exportovano VARCHAR[] = ''{}''; r RECORD;
mohu_exportovat BOOLEAN;
BEGIN
12 matches
Mail list logo