X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A68FA475AE5 for ; Thu, 10 Apr 2003 02:36:05 -0400 (EDT) Received: from sv003.int.jongert.nl (jongert.nl [194.109.59.87]) by postgresql.org (Postfix) with ESMTP id 8B75B474E42 for ; Thu, 10 Apr 2003 02:36:04 -0400 (EDT) Received: from IT001 (IT001.int.jongert.nl [10.0.0.241]) by sv003.int.jongert.nl (Postfix) with SMTP id 4946A99 for ; Thu, 10 Apr 2003 08:36:04 +0200 (CEST) From: "Ries van Twisk" To: Subject: The need to know if a field is using/connected to a sequence Date: Thu, 10 Apr 2003 08:36:02 +0200 Message-ID: <002001c2ff2b$757fc6a0$f100000a@IT001> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal X-Spam-Status: No, hits=-1.6 required=5.0 tests=BAYES_30 version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/151 X-Sequence-Number: 12852 I currently use this to get field information of a table: Now I just want to know (boolean field maby??) if a field is using/connected to q sequence or not. Which table should I access to get this information SELECT a.attnum, a.attname AS field, t.typname AS type, a.attlen AS length, a.atttypmod AS lengthvar, a.attnotnull AS notnull FROM pg_class c, pg_attribute a, pg_type t WHERE c.relname = 'your_table_name' and a.attnum > 0 and a.attrelid = c.oid and a.atttypid = t.oid ORDER BY a.attnum