pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Doubt
4+ messages / 4 participants
[nested] [flat]

* Doubt
@ 2004-09-22 11:11  S.Sreejith <sreejith77@rediffmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: S.Sreejith @ 2004-09-22 11:11 UTC (permalink / raw)
  To: pgsql-sql

 Sir,
      I am new to PostgreSQL. I have a doubt. Now i am doing one project in .NET technology with postgres(linux) as database. I am using pgADMIN and pgManager as tools for database releted activities. Now i am able to create functions with 'sql' language. When i select 'pgsql' as language for creating query, an error poping up. How to create Query using 'pgsql' language. if any new tools need to be installed. Plz rectify. Mail me back at sreejith77@rediffmail.com

Sreejith=

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Doubt
@ 2004-09-28 20:39  Paul Thomas <paul@tmsl.demon.co.uk>
  parent: S.Sreejith <sreejith77@rediffmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Paul Thomas @ 2004-09-28 20:39 UTC (permalink / raw)
  To: S . Sreejith <sreejith77@rediffmail.com>; +Cc: pgsql-sql


On 22/09/2004 12:11 S.Sreejith wrote:
>  Sir,
>       I am new to PostgreSQL. I have a doubt. Now i am doing one project
> in .NET technology with postgres(linux) as database. I am using pgADMIN
> and pgManager as tools for database releted activities. Now i am able to
> create functions with 'sql' language. When i select 'pgsql' as language
> for creating query, an error poping up. How to create Query using 'pgsql'
> language. if any new tools need to be installed. Plz rectify. Mail me back
> at sreejith77@rediffmail.com

I bet you haven't enabled pl/pgsql use createlang. Read the docs.


-- 
Paul Thomas
+------------------------------+-------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for Business           |
| Computer Consultants         | http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+-------------------------------------------+



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* doubt
@ 2007-05-17 09:43  S balasankaravadivel <bsvssa@yahoo.co.in>
  0 siblings, 1 reply; 4+ messages in thread

From: S balasankaravadivel @ 2007-05-17 09:43 UTC (permalink / raw)
  To: pgsql-sql

Shall i use \d command from the c program. If possible give me a example program.




      Office firewalls, cyber cafes, college labs, don't allow you to download CHAT? Click here: http://in.messenger.yahoo.com/webmessengerpromo.php

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: doubt
@ 2007-05-20 01:01  John DeSoi <desoi@pgedit.com>
  parent: S balasankaravadivel <bsvssa@yahoo.co.in>
  0 siblings, 0 replies; 4+ messages in thread

From: John DeSoi @ 2007-05-20 01:01 UTC (permalink / raw)
  To: S balasankaravadivel <bsvssa@yahoo.co.in>; +Cc: pgsql-sql

On May 17, 2007, at 5:43 AM, S balasankaravadivel wrote:
> Shall i use \d command from the c program. If possible give me a  
> example program.


If you want to use the \d command in a C program, link your program  
to libpq and grab the C source code for the \d command from psql.

Also, if you just need to know the SQL used to generate the command  
output you can use the following command:

\set ECHO_HIDDEN 1

Now all the SQL used in psql commands will be displayed. The SQL for  
the \d command is


=== psql 5 ===
\d

********* QUERY **********
SELECT n.nspname as "Schema",
   c.relname as "Name",
   CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i'  
THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' END as  
"Type",
   r.rolname as "Owner"
FROM pg_catalog.pg_class c
      JOIN pg_catalog.pg_roles r ON r.oid = c.relowner
      LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind IN ('r','v','S','')
       AND n.nspname NOT IN ('pg_catalog', 'pg_toast')
   AND pg_catalog.pg_table_is_visible(c.oid)
ORDER BY 1,2;
**************************

                   List of relations
Schema |           Name           |   Type   | Owner
--------+--------------------------+----------+-------
public | barcode                  | table    | user1
public | foo                      | table    | user1
public | foo_a_seq                | sequence | user1
(3 rows)


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2007-05-20 01:01 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-09-22 11:11 Doubt S.Sreejith <sreejith77@rediffmail.com>
2004-09-28 20:39 ` Paul Thomas <paul@tmsl.demon.co.uk>
2007-05-17 09:43 doubt S balasankaravadivel <bsvssa@yahoo.co.in>
2007-05-20 01:01 ` Re: doubt John DeSoi <desoi@pgedit.com>

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