Re: [GENERAL] spooky refusal to insert

2007-01-01 Thread brian
Gurjeet Singh wrote: On 1/2/07, brian <[EMAIL PROTECTED]> wrote: Here are the new tables (Note that set_id() and get_id() are functions which use the $_SHARED structure so that i can set some vars and refer back to them later) Hi Brian, Can you please explain the $_SHARED structure you

Re: [GENERAL] regular expression limit

2007-01-01 Thread Tom Lane
Ron Peterson <[EMAIL PROTECTED]> writes: > I believe there's been a change in PostgreSQL's regular expression > handling w/ 8.2. Compared to what? A repeat count of 256 has been an error at least since 7.4, and is documented as such: : The numbers m and n within a bound are unsigned decimal inte

Re: [GENERAL] spooky refusal to insert

2007-01-01 Thread Gurjeet Singh
On 1/2/07, brian <[EMAIL PROTECTED]> wrote: Here are the new tables (Note that set_id() and get_id() are functions which use the $_SHARED structure so that i can set some vars and refer back to them later) Hi Brian, Can you please explain the $_SHARED structure you mention here? I am not

[GENERAL] regular expression limit

2007-01-01 Thread Ron Peterson
I believe there's been a change in PostgreSQL's regular expression handling w/ 8.2. CREATE TABLE testb ( name TEXT --CHECK( name ~ '^[a-f0-9]{1,256}$' ) CHECK( name ~ '^[a-f0-9]{1,255}$' ) ); If I swap the two check statements above, I can no longer insert data. The operation errors

Re: [GENERAL] Installing support for python on windows

2007-01-01 Thread novnov
Thanks, the depends tools looks very handy, surprising I'd not heard of it before. I found that the postgresql\bin dir must be added to the path. Also, I had python 2.5 installed, and plpython apparently needs python 2.4. I've installed that and added to the path, but there is another dependency

Re: [GENERAL] Installing support for python on windows

2007-01-01 Thread Adrian Klaver
On Monday 01 January 2007 3:39 pm, novnov wrote: > It should be easy enough - just run "depends plpython.dll" in the > directory where plpython is. > > Two things to verify first: > 1) Verify that you added the directories to the system path, and not > your personal path > 2) Did you restart the se

Re: [GENERAL] Installing support for python on windows

2007-01-01 Thread novnov
It should be easy enough - just run "depends plpython.dll" in the directory where plpython is. Two things to verify first: 1) Verify that you added the directories to the system path, and not your personal path 2) Did you restart the server after adding it? Needs to be done for windows to pick u

Re: [GENERAL] How to convert "money" columns to "numeric"?

2007-01-01 Thread Adrian Klaver
On Monday 01 January 2007 1:45 pm, Ken Winter wrote: > I want to convert a column named "amount", currently of type money, to type > numeric(10,2). > > When I try to do this using: > > ALTER TABLE transaction ALTER COLUMN amount TYPE NUMERIC(10,2); > > I get: > > PostgreSQL Error Code: (1) > ERROR:

Re: [GENERAL] Installing support for python on windows

2007-01-01 Thread novnov
Adrian Klaver wrote: > > On Monday 01 January 2007 11:14 am, Magnus Hagander wrote: >> novnov wrote: >> > This is so much more difficult than I imagined it could be. I've added >> > the main python dir and the lib dir to my path and nothing has changed. >> I >> > may be able to figure out how t

Re: [GENERAL] spooky refusal to insert [SOLVED]

2007-01-01 Thread brian
brian wrote: postgresql 8.1, fedora core 4 I'm trying to update a database with a few new tables and insert some data. However, psql is refusing to insert some of the data, leading to errors when trying to refer to the sequence in the next insert (to a cross table). Sure, less than ten mi

[GENERAL] How to convert "money" columns to "numeric"?

2007-01-01 Thread Ken Winter
I want to convert a column named "amount", currently of type money, to type numeric(10,2). When I try to do this using: ALTER TABLE transaction ALTER COLUMN amount TYPE NUMERIC(10,2); I get: PostgreSQL Error Code: (1) ERROR: column "amount" cannot be cast to type "pg_catalog.numeric" So t

Re: [GENERAL] Problem with index in OR'd expression

2007-01-01 Thread Ragnar
On mán, 2007-01-01 at 14:21 -0600, [EMAIL PROTECTED] wrote: > Within the context of the function (after calling), these variables are > constant and I'm attempting to use my OR syntax as shorthand to avoid > having to use a dynamic statement *only* because of this situation. > As I've mentioned,

Re: [GENERAL] Installing support for python on windows

2007-01-01 Thread Adrian Klaver
On Monday 01 January 2007 11:14 am, Magnus Hagander wrote: > novnov wrote: > > This is so much more difficult than I imagined it could be. I've added > > the main python dir and the lib dir to my path and nothing has changed. I > > may be able to figure out how to use the depends tool, so far it lo

Re: [GENERAL] spooky refusal to insert

2007-01-01 Thread brian
That should be version 8.1.4 -- sorry brian ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] spooky refusal to insert

2007-01-01 Thread brian
postgresql 8.1, fedora core 4 I'm trying to update a database with a few new tables and insert some data. However, psql is refusing to insert some of the data, leading to errors when trying to refer to the sequence in the next insert (to a cross table). Here are the new tables (Note that set

Re: [GENERAL] Problem with index in OR'd expression

2007-01-01 Thread postgresql . org
Ragnar wrote: Reguardless of the issue whether pl/pgsql could be expected to optimize this case, I find it difficult to imagine a scenario where this kind of coding makes sense. I understand that in some cases on would like to do this with a *variable* to simplify logic, but what possible gain c

Re: [GENERAL] Installing support for python on windows

2007-01-01 Thread Magnus Hagander
novnov wrote: > This is so much more difficult than I imagined it could be. I've added the > main python dir and the lib dir to my path and nothing has changed. I may be > able to figure out how to use the depends tool, so far it looks pretty > obscure to a newb. It should be easy enough - just ru

Re: [GENERAL] Installing support for python on windows

2007-01-01 Thread novnov
This is so much more difficult than I imagined it could be. I've added the main python dir and the lib dir to my path and nothing has changed. I may be able to figure out how to use the depends tool, so far it looks pretty obscure to a newb. This is all being done on a new workstation. It is a li

Re: [GENERAL] Installing support for python on windows

2007-01-01 Thread Magnus Hagander
novnov wrote: > Then I tried something like what Adrian had suggested: > > D:\postgresql\bin>createlang -U sauser -d mydb plpythonu > Password: > createlang: language installation failed: ERROR: could not load library > "D:/pos > tgresql/lib/plpython.dll": The specified module could not be found.

Re: [GENERAL] Installing support for python on windows

2007-01-01 Thread Adrian Klaver
On Sunday 31 December 2006 7:06 pm, novnov wrote: > Thanks to both of you. I tried the following and got an error that > plpython.dll couldn't be found: > > D:\postgresql\bin>createlang -U sauser plpythonu mydb > Password: > createlang: language installation failed: ERROR: could not load library >

Re: [GENERAL] permission denied for relation

2007-01-01 Thread Andreas Kretschmer
Armon Ezra <[EMAIL PROTECTED]> schrieb: > while browsing a web site (which I am trying to handle), I get an error > message like this: > *" Warning*: pg_query() [function.pg-query]: Query failed: ERROR: > permission denied for relation -table name- in... on line 45 " > I believe it ha

[GENERAL] permission denied for relation

2007-01-01 Thread Armon Ezra
while browsing a web site (which I am trying to handle), I get an error message like this: *" Warning*: pg_query() [function.pg-query]: Query failed: ERROR: permission denied for relation -table name- in... on line 45 " I believe it has a connection to upgrading to postgresql8 , but I