Creating Tables - Mailing list pgsql-general

From Scherf Andreas
Subject Creating Tables
Date
Msg-id 3691EA9E.865C539E@fh-trier.de
Whole thread Raw
List pgsql-general
Hello, i have written the following function to create tables in my
program but Postgres returned that the SQL statement would be ignored.
I have a database connection with a user that has all rights.

Now my question how can i create tables and drop them in my C Code ??

Thanks Andreas

________________________

gint create_database_tables ()
{

res=execSQL("drop table vereine");

res=execSQL("create table vereine (
  number int2,
  v_name text);");

res=execSQL("drop table runner");
res=execSQL("create table runner (
 number int2,
 name text,
 vorname text,
 geb_jahr int2,
 sex int2,
 lauf_nr int2,
 verein int2,
 aktiv int2
  );");
res = PQexec (conn, "END");
PQclear(res);
return 0;
}

--

Scherf Andreas
mail : scherfa@fh-trier.de

pgsql-general by date:

Previous
From: Holger Klawitter
Date:
Subject: String Concatenation does not work.
Next
From: Kevin Heflin
Date:
Subject: select using date