Re: [SQL] Checking for table existence (fwd)

2001-09-19 Thread Kovacs Baldvin
bject: Re: [SQL] Checking for table existence > > CREATE FUNCTION my_function ( ... > > > IF NOT table_exists(''my_table'') THEN > CREATE TABLE ... > END IF; > > > > Got the idea? Not bad... Well, I am not the person questioned...

Re: [SQL] Checking for table existence

2001-09-18 Thread Kovacs Baldvin
> > CREATE FUNCTION my_function ( ... > > > IF NOT table_exists(''my_table'') THEN > CREATE TABLE ... > END IF; > > > > Got the idea? Not bad... Well, I am not the person questioned... But let me share a few ideas about it. The solution what I gave was a "more SQL way" of doing i

Re: [SQL] Checking for table existence

2001-09-17 Thread Josh Berkus
Julester, > Hi everyone. In my old SQL Server days, I used a command such as "IF > exists(select name from sys_objects where name = 'xyztable')" to > check if a > table existed before creating it with a standard CREATE command. I > looked > in the PostgreSQL documentation, but for the life of

Re: [SQL] Checking for table existence

2001-09-17 Thread Kovacs Baldvin
> Hi everyone. In my old SQL Server days, I used a command such as "IF > exists(select name from sys_objects where name = 'xyztable')" to check if a As far as I know, there is not direct support of this. However, I also would appreciate a builtin qexec(text) procedure, for making queries. Now

Re: [SQL] Checking for table existence

2001-09-17 Thread Roberto Mello
On Fri, Sep 14, 2001 at 06:58:29PM +, Julester wrote: > Hi everyone. In my old SQL Server days, I used a command such as "IF > exists(select name from sys_objects where name = 'xyztable')" to check if a > table existed before creating it with a standard CREATE command. I looked > in the Pos

[SQL] Checking for table existence

2001-09-17 Thread Julester
Hi everyone. In my old SQL Server days, I used a command such as "IF exists(select name from sys_objects where name = 'xyztable')" to check if a table existed before creating it with a standard CREATE command. I looked in the PostgreSQL documentation, but for the life of me, I can't find an equ