Hello jack,
To check if a table exists you could use:
select tablename from pg_tables;
For instance:
dhcp=# select count(*) from pg_tables where tablename='dhcp_subnet';count
------- 1
(1 row)
dhcp=# select count(*) from pg_tables where tablename='dhcp_subnetaa';count
------- 0
(1 row)
To see the system tables use \dS
The second I don't really know what you would like to see.
Perhaps a trigger could do this after the insert/update/delete ?
Best regards,
Roelof
> -----Original Message-----
> From: datactrl [SMTP:quals@bigfoot.com]
> Sent: 15 March 2001 12:04
> To: pgsql-sql@postgresql.org
> Subject: [SQL] Some questions about PLpgSql
>
> Hi, all
>
> By using 'PLpgsql', is that possible to
>
> 1) check if a specific table exists?
> 2) check if an INSERT/UPDATE/ DELETE has done successfully?
>
>
> Is there some more documents or samples for PLpgsql except USER GUIDE and
> PostgreSQL Introduction & concept?
>
> THANK YOU
>
> JACK
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html