Re: [GENERAL] psql seems to hang during delete query

2006-07-20 Thread surabhi.ahuja
so how much space should be free so that i am able to delete   i have a hard disk of size 130 G.     thanks, regards Surabhi From: Harald Armin Massa [mailto:[EMAIL PROTECTED]Sent: Thu 7/20/2006 12:16 PMTo: surabhi.ahujaCc: pgsql-general@postgresql.orgSubject: Re: [GENERAL] psql seems to

[GENERAL] timestamp and calculations.

2006-07-20 Thread Thor Tall
Hi, I am new to postgres sql and have a problem with an sql statement which I hope you can help me with. I want to do some calculation on the result of a query. I have a table tb_test which contains a timestamp column my_timestamp. My sql statement should display my_timestamp as "00", "20", "4

Re: [GENERAL] timestamp and calculations.

2006-07-20 Thread Andreas Kretschmer
Thor Tall <[EMAIL PROTECTED]> schrieb: > Hi, > > I am new to postgres sql and have a problem with an > sql statement which I hope you can help me with. > > I want to do some calculation on the result of a > query. > > I have a table tb_test which contains a timestamp > column my_timestamp. > >

Re: [GENERAL] UTF8 conversion differences from v8.1.3 to v8.1.4

2006-07-20 Thread Martijn van Oosterhout
On Wed, Jul 19, 2006 at 06:06:08PM -0400, Eric Faulhaber wrote: > Martijn van Oosterhout wrote: > > On Wed, Jul 19, 2006 at 05:24:53PM -0400, Eric Faulhaber wrote: > >> OK, but now that this "feature" has been removed in 8.1.4, how is this > >> supposed to be handled, given that we don't control wh

Re: [GENERAL] function is quick for one row but super slow on more than 5..

2006-07-20 Thread Rhys Stewart
Hi All, the following takes about 2 seconds to run: select route,not_in_route2(route) from ksanrt limit 5, but if i limit it to anything greater than 5 it takes forever to come back. Forever as in I always cancel the query. Any reasons why? On 7/19/06, Rhys Stewart <[EMAIL PROTECTED]> wrote:

Re: [GENERAL] customizing pg_dump together with copy.c's DoCopy function

2006-07-20 Thread [EMAIL PROTECTED]
Brian, Those are very interesting ideas. Thanks. I've been playing around with pg_dump. Modifying it to selectively dump/restore tables and columns is pretty easy. But as you say, changing the data content within the data buffers to reflect varying column values, changed column types, and new colu

[GENERAL] Ann: PyPgExplorer-0.8

2006-07-20 Thread Jerry LeVan
PyPgExplorer is a pure python application that allows the user to browse and modify Postgresql Databases. Features include: o A Scripts menu that makes access to your favorite SQL scripts only a click away. o On unix and Mac systems, if psql is detected in a standard location, then access to

Re: [GENERAL] psql seems to hang during delete query

2006-07-20 Thread Sven Willenberger
On Thu, 2006-07-20 at 12:48 +0530, surabhi.ahuja wrote: > so how much space should be free so that i am able to delete > > i have a hard disk of size 130 G. > > > thanks, > regards > Surabhi > > > __ If you are trying to de

Re: [GENERAL] timestamp and calculations.

2006-07-20 Thread Sven Willenberger
On Thu, 2006-07-20 at 11:57 +0200, Andreas Kretschmer wrote: > Thor Tall <[EMAIL PROTECTED]> schrieb: > > > Hi, > > > > I am new to postgres sql and have a problem with an > > sql statement which I hope you can help me with. > > > > I want to do some calculation on the result of a > > query. > >

[GENERAL] calling stored procedure using ECPG

2006-07-20 Thread Jasbinder Bali
Hi, Can anyone please tell me how do I call a stored procedure using ECPG??A code snippet would really be handy..Thanks,~Jas

[GENERAL] access method "gin" does not exist

2006-07-20 Thread Kevin Murphy
I'm trying to test the 8.1 backport of the 8.2 GIN index and tsearch2 functionality. The patch is applied successfully (to 8.1.4, on OS X 10.4.7 w/ xcode 2.3), the build and install goes well, stop & start of postmaster is done, but initializing tsearch2 fails: psql -U postgres minitest < /

Re: [GENERAL] UTF8 conversion differences from v8.1.3 to v8.1.4

2006-07-20 Thread Eric Faulhaber
Martijn van Oosterhout wrote: > On Wed, Jul 19, 2006 at 06:06:08PM -0400, Eric Faulhaber wrote: >> Martijn van Oosterhout wrote: >>> On Wed, Jul 19, 2006 at 05:24:53PM -0400, Eric Faulhaber wrote: OK, but now that this "feature" has been removed in 8.1.4, how is this supposed to be handle

Re: [GENERAL] UTF8 conversion differences from v8.1.3 to v8.1.4

2006-07-20 Thread Martijn van Oosterhout
On Thu, Jul 20, 2006 at 12:07:54PM -0400, Eric Faulhaber wrote: > > Well, there's a really nasty workaround: create a cast from bytea to > > text which doesn't change the value. This will get your data into the > > database without any encoding checks at all. Ofcourse, you're then > > responsible f

[GENERAL] pg_dump & pg_restore suggestion

2006-07-20 Thread Pavel Golub
Hello, pgsql-general. Is it possible to create not only executable version of pg_dump and pg_restore, but also libraries (.so, .dll) so developers can use them freely the same as libpq client library? I suppose it would be very usefull. For me it's for sure. -- With best wishes, Pavel

[GENERAL] ECPG usage

2006-07-20 Thread Jasbinder Bali
Hi,I have the follwing ECPG code.-#include EXEC SQL INCLUDE sqlca;int main (){    EXEC SQL BEGIN DECLARE SECTION;     char movie_type[20];    char *movie_title=NULL;    char query_string[

Re: [GENERAL] UTF8 conversion differences from v8.1.3 to v8.1.4

2006-07-20 Thread Eric Faulhaber
Martijn van Oosterhout wrote: > On Thu, Jul 20, 2006 at 12:07:54PM -0400, Eric Faulhaber wrote: >>> Well, there's a really nasty workaround: create a cast from bytea to >>> text which doesn't change the value. This will get your data into the >>> database without any encoding checks at all. Ofcours

[GENERAL] Create index hanging

2006-07-20 Thread Claire McLister
Hi, We have a couple of tables (40,000 and 600,000 rows each) that I am trying to build an index on an integer column. When I issue the "create index foo_index on foo(id);" command in psql it just does not return. I've waited over half an hour for the smaller table. The same command

[GENERAL] Column info without executing query

2006-07-20 Thread Dan Strömberg
Hi List ! I would like to know if it is possible to find out the datatypes in the resultset of a query or a set returning function without actually executing them ? I know there is something like that in MS SQL Server where you can use the SET FMTONLY option and only get the column informati

Re: [GENERAL] Create index hanging

2006-07-20 Thread Claire McLister
Thanks. Haven't VACUUMed ever. (Sloppy housekeeping:-) Will do so and let you know if it helped. There seems to have been some other problem too. I had to just now forcefully shut down the postmaster and re-start it as it was beginning to block on other requests as well. If I Ctl-C the PS

Re: [GENERAL] Create index hanging

2006-07-20 Thread Claire McLister
No, this is a brand new index, so no drops. On Jul 20, 2006, at 2:03 PM, Ian Harding wrote: On 7/20/06, Claire McLister <[EMAIL PROTECTED]> wrote: Hi, We have a couple of tables (40,000 and 600,000 rows each) that I am trying to build an index on an integer column. When I issue the "crea

Re: [GENERAL] Column info without executing query

2006-07-20 Thread Tom Lane
=?ISO-8859-1?Q?Dan_Str=F6mberg?= <[EMAIL PROTECTED]> writes: > I would like to know if it is possible to find out the datatypes in the > resultset of a query or a set returning > function without actually executing them ? You could always do "SELECT ...whatever ... LIMIT 0". Also, at the protoco

Re: [GENERAL] Create index hanging

2006-07-20 Thread Tom Lane
Claire McLister <[EMAIL PROTECTED]> writes: > We have a couple of tables (40,000 and 600,000 rows each) that I am > trying to build an index on an integer column. > When I issue the "create index foo_index on foo(id);" command in > psql it just does not return. I've waited over half an hou

Re: [GENERAL] calling stored procedure using ECPG

2006-07-20 Thread Florian G. Pflug
Jasbinder Bali wrote: Hi, Can anyone please tell me how do I call a stored procedure using ECPG?? A code snippet would really be handy.. I don't know about ECPG, but doing "select myfunc();" should work I guess.. greetings, Florian Pflug ---(end of broadcast)---

Re: [GENERAL] Column info without executing query

2006-07-20 Thread Erik Jones
Dan Strömberg wrote: Hi List ! I would like to know if it is possible to find out the datatypes in the resultset of a query or a set returning function without actually executing them ? Well for result sets of queries on tables there is always the pg_attribute catalog table. See: http://ww

[GENERAL] setting serial start value

2006-07-20 Thread Greg Philpott
I have a table with a field called "id" that is a serial field and pkey. I would like to set the the sequence to start at 1 and increase sequentially from there but I can't seem to get that to work. any suggestions are greatly appreciated. I am using version 7.4.7 Greg

Re: [GENERAL] setting serial start value

2006-07-20 Thread Michael Fuhr
On Thu, Jul 20, 2006 at 09:32:56PM -0400, Greg Philpott wrote: > I have a table with a field called "id" that is a serial field and > pkey. I would like to set the the sequence to start at 1 and > increase sequentially from there but I can't seem to get that to > work. any suggestions are

[GENERAL] ECPG (usage of simple select statement)

2006-07-20 Thread Jasbinder Bali
Hi,   I'm using ECPG in my C code and I want to display the result of a simple select statement.   If i write something like EXEC SQL select * from abc ; (which as of now is not working)   wouldn't this display the result staright away or its always mandatory to use a cursor and then do printf() f

Re: [GENERAL] setting serial start value

2006-07-20 Thread Greg Philpott
Hi Michael, from terminal in psql I enter # ALTER SEQUENCE public.users MINVALUE ; But it doesn't work. I don't think I am specifying the field correctly. the schema is public, the table is users, the field is id. Thanks, Greg On 20-Jul-06, at 10:49 PM, Michael Fuhr wrote: On Thu, Jul 20

Re: [GENERAL] setting serial start value

2006-07-20 Thread Michael Fuhr
On Thu, Jul 20, 2006 at 11:35:51PM -0400, Greg Philpott wrote: > Hi Michael, from terminal in psql I enter > # ALTER SEQUENCE public.users MINVALUE ; > But it doesn't work. I don't think I am specifying the field > correctly. the schema is public, the table is users, the field is id. ALTER

Re: [GENERAL] setting serial start value

2006-07-20 Thread Greg Philpott
Thanks Michael that did the trick! Greg On 21-Jul-06, at 12:05 AM, Michael Fuhr wrote: On Thu, Jul 20, 2006 at 11:35:51PM -0400, Greg Philpott wrote: Hi Michael, from terminal in psql I enter # ALTER SEQUENCE public.users MINVALUE ; But it doesn't work. I don't think I am specifying the fi