Re: [SQL] Debet-Credit-Balance Calculation

2005-04-19 Thread Mihail Nasedkin
I think you forget FOREIGN KEY: transactions.trx_type_id -> trx_type.id MAMH> Dear All, MAMH> I have problem to calculation MAMH> balance from debet and credit. MAMH> my transaction table: ... MAMH> CREATE TABLE "public"."transactions" ( MAMH>   MAMH> "id" SERIAL, MAMH>   "trx_timestamptz" TI

Re: [SQL] view function on pg_toast

2005-03-22 Thread Mihail Nasedkin
=\d pg-catalog.pg_proc xxx:=\d pg_catalog.pg_proc MN> xxx:=select procsrc from pg-catalog.pg_proc where proname=... and MN> pronamespace=...; xxx:=select procsrc from pg_catalog.pg_proc where proname=... and pronamespace=...; -- Regards, Mihail Nasedkin mailto:[EMAIL PROTECTED]

Re: [SQL] view function on pg_toast

2005-03-22 Thread Mihail Nasedkin
xxx:=select procsrc from pg-catalog.pg_proc where proname=... and pronamespace=...; -- Regards, Mihail Nasedkin mailto:[EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: Have you searched our list archives?

Re: [SQL] index scan

2005-03-21 Thread Mihail Nasedkin
Die, Richard. Thank you for answer March, 21 2005 14:15:40: RH> Mihail Nasedkin wrote: >> =# explain select * from sites s join site_screens ss on >> s.oid = ss.id_site;

[SQL] index scan

2005-03-21 Thread Mihail Nasedkin
can on site_screens ss (cost=...) -> Hash (cost=...) -> Seq Scan on sites s (cost=...) I want to Index Scan. What must I do? -- Regards, Mihail Nasedkin mailto:[EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] How to view the list of tables?

2005-02-15 Thread Mihail Nasedkin
Hello, Konstantin. You wrote February, 15 2005 г., 15:16:57: KD> I need to view the list of tables in a database. In MySQL I KD> can do it with the command "SHOW TABLES". What about PostgreSQL? All tables: select ... from pg_catalog.pg_class where c.relkind='r'; All tables of the public schem

Re: [SQL] OID's

2005-01-23 Thread Mihail Nasedkin
Thanks Michael for answer January, 24 2005, 9:58:35: MF> On Mon, Jan 24, 2005 at 08:57:43AM +0500, Mihail Nasedkin wrote: >> I don't need to know which tables have OIDS. I want know which system >> table contain column OID with all OID's inserted into my tables. MF>

Re: [SQL] OID's

2005-01-23 Thread Mihail Nasedkin
Hello, pgsql-sql and Michael. MF> On Fri, Jan 21, 2005 at 11:17:34AM +0500, Mihail Nasedkin wrote: >> I have already read about "System Columns" of the PostgreSQL documentation. >> In the table "pg_catalog.pg_attribute" column "attrelid" contain >

Re: [SQL] OID's

2005-01-20 Thread Mihail Nasedkin
Hello, Michael. Thank you for answer January, 20 2005, 21:48:30: MF> On Thu, Jan 20, 2005 at 03:45:58PM +0500, Mihail Nasedkin wrote: >> How (where) I can get all OID's of the PostgeSQL >> installation? >> In other words where OID's is stored? Is it stored

[SQL] OID's

2005-01-20 Thread Mihail Nasedkin
Hi, I have a question about OID. How (where) I can get all OID's of the PostgeSQL installation? In other words where OID's is stored? Is it stored in special table? I would like use some SQL queries with the all OID's. Is this possible? I hadn't find the answer in the FAQ ( 4.16 What is an OID