From: Lucas Hernndez <lucashdz@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Cursor need it?
Date: Wed, 08 Jun 2005 10:44:27 -0400
Message-ID: <42A7044B.4080604@gmail.com> (raw)
I am a new postgres user
I want to get a list of tables from pg_tables where tables are like
‘%wo%’ (for example).. and then query that list ….
Select count(*) from tableVARIABLENAMEFROMFIRSTQUERY
In SQL SERVER I can do that using cursor but in postgresql I don’t
understand how to use cursors
Here is what I am trying to do
for each table on the list
Select tablename, count(*) tables from ( list of tables)
tablename tables
table1 25
table2 35
Any Idea would be appreciated
Thanks
Lucas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: lucashdz@gmail.com
Subject: Re: Cursor need it?
In-Reply-To: <42A7044B.4080604@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox