Обсуждение: Problem - Error: Cannot create table

Поиск
Список
Период
Сортировка

Problem - Error: Cannot create table

От
Jens Niehaus
Дата:
Hello,

i've problems creating a table which was already created in an earlier
transaction which crashed before completion (PostgreSQL 6.4.0, linux 2.0.36,
libc-5.4):

>postgres:> psql example
>[...]
>example=> BEGIN TRANSACTION;
>BEGIN
>example=> CREATE TABLE corrupt (name int4);
>CREATE

now the psql-process receives a SIGKILL from somewhere else

>postgres:> ps |grep psql
1234  p5 S    0:00 psql example
>postgres:> kill -9 1234

this results in

>example=> Killed

When I try to create the table again:

>postgres:> psql example
>[...]
>example=> BEGIN TRANSACTION;
>BEGIN
>example=> CREATE TABLE corrupt (name int4);
>ERROR:  cannot create corrupt
>beispiel=> END TRANSACTION;
>END
>example=> DROP TABLE CORRUPT;
>ERROR:  Relation corrupt Does Not Exist!


The same thing happens when i try somthing like 'PQexec(conn,"BEGIN");PQexec(co
nn,"CREATE...");exit(1);' with libpq.

Is there a way to fix it and to create the table again?


Thanks,
        Jens


doing SQL lookup to postgres from Foxpro

От
"William J. Stotts"
Дата:
Newbie question:
I am in a situation where I may need to be able to interface to a postgres
table from wihtin a foxpro 2.6 application. The maintainers fo the foxpro
app say they can use SQL statements to access my postgres table. What
interface to postgres allows this? Can anyone out there give me an
overview of how I should approach this?
Thanks in advance!
Please reply to my email directly as well as the list!
Bill
**************************************************************************
Bill Stotts                          |  Voice: 860-616-7535
wstotts@sonitrol.net                 |    Fax: 860-616-7589
Sonitrol Communications Corp.        |
                                     |
_SONITROL_ Expect the best...        |  Where do you want to GO tomorrow?
**************************************************************************