Re: [SQL] record count

2002-08-29 Thread Bhuvan A
> > Hello list, > > Is there a system attribute or table or ? providing record count by table? > > Thanks. > pg_class.reltuples has the record count. regards, bhuvaneswaran ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ

Re: [SQL] record count

2002-08-29 Thread Bruno Wolff III
On Thu, Aug 29, 2002 at 13:37:40 -0500, "Marie G. Tuite" <[EMAIL PROTECTED]> wrote: > > Is there a system attribute or table or ? providing record count by table? No. Normally you use the count aggregate to obtain that information. However if you do few updates and need this information fairl

[SQL] record count

2002-08-29 Thread Marie G. Tuite
Hello list, Is there a system attribute or table or ? providing record count by table? Thanks. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] union optimization in views

2002-08-29 Thread Josh Berkus
Joe, > We are attempting to move a couple of systems from Oracle to Postgres but can not do so without application rewrites due to the current use of views with UNIONs and the criticality of the performances of these views. > > I was wondering if a decision has been made on the optimization wi

[SQL] the optimizer and exists

2002-08-29 Thread Thomas F. O'Connell
i think i might've stumbled across a tiny defect in the optimizer. unfortunately, i haven't the knowledge of the code to know where to begin looking at how to address this problem. anyway, consider the following: create table foo( id int2 ); create table bar( id int2 f

Re: [SQL] signed/unsigned integers

2002-08-29 Thread Bruno Wolff III
On Fri, Aug 23, 2002 at 11:11:51 +0200, Roger Mathis <[EMAIL PROTECTED]> wrote: > Hi > > Is it true, that I can't define unsigned integers in a table definition? If the main issue is that there not be negative numbers, you can use a constraint to enforce this. In 7.3 you can define a domain wi

[SQL] signed/unsigned integers

2002-08-29 Thread Roger Mathis
Hi Is it true, that I can't define unsigned integers in a table definition? CU Roger ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your messag

Re: [SQL] sql statement to give functionality of \d tablename?

2002-08-29 Thread Lee Harr
In article <[EMAIL PROTECTED]>, Philip Rudling wrote: > Is the an SQL statement that can be used from within a program that will > give the output of \d command? Like the describe command in MySQL's version > of SQL? > There is a flag to psql which will show you the sql from the backslash comm

[SQL] sql statement to give functionality of \d tablename?

2002-08-29 Thread Philip Rudling
Is the an SQL statement that can be used from within a program that will give the output of \d command? Like the describe command in MySQL's version of SQL? SR ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an app

[SQL] bytea ,etc.

2002-08-29 Thread Klimov Andrew
Hi , All!   Could someone clarify me  :   When I want to store BLOB's internally in database (for example jpeg ) should I use bytea or OID? Is OID something like BFILE in Oracle 8i? If both are appropriate why I can't use update image set picture=lo_import('Myfile') where image_code='blablab

[SQL] trigger viewing

2002-08-29 Thread Kemin Zhou
Dear Friends, Some times when we create foreign keys we find these type of things after \d table Triggers: RI_ConstraintTrigger_39656710, RI_ConstraintTrigger_39656716 These trigger could be this table using foreigin keys from other table or vis versa. I don't know how to figure out wh