Re: [SQL] sqlstate 02000 while declaring cursor/freeing prepared

2005-08-29 Thread Michael Fuhr
On Mon, Aug 29, 2005 at 04:39:36PM -0500, andy rost wrote: > I worked on my problem a little further and have a little more > information to share. The declare statement that fails consistently > follows a select statement that returns zero rows (and sqlcode 100 and > sqlstate '02000'). If I omm

Re: [SQL] sqlstate 02000 while declaring cursor/freeing prepared

2005-08-29 Thread andy rost
I worked on my problem a little further and have a little more information to share. The declare statement that fails consistently follows a select statement that returns zero rows (and sqlcode 100 and sqlstate '02000'). If I ommit the select statement from the code or set sqlcode to 0 before c

Re: [SQL] sqlstate 02000 while declaring cursor/freeing prepared

2005-08-29 Thread andy rost
Sure. I'm using ECPG (ecpg -t -r no_indicator -C INFORMIX) in a TRU64 operating system for PostgreSQL version 8.0.2. By occasionally, I mean that I don't observe this problems for each declare and free statement that I've encoded - only for a subset of those commands. But I do observe this prob

Re: [SQL] question

2005-08-29 Thread Thomas F. O'Connell
Matt, In PostgreSQL 8.0.3, I see: postgres=# select nullif( '1', '' ); nullif 1 (1 row) postgres=# select nullif( '', '' ) is null; ?column? -- t (1 row) What behavior are you expecting? -- Thomas F. O'Connell Co-Founder, Information Architect Sitening, LLC Strategic Open So

Re: [SQL] sqlstate 02000 while declaring cursor/freeing prepared statements

2005-08-29 Thread Michael Fuhr
On Mon, Aug 29, 2005 at 02:28:24PM -0500, andy rost wrote: > I'm in the process of porting Informix ESQL to PostgreSQL. I > occasionally get sqlcode = 100 and sqlstate = 02000 when declaring > cursors or freeing prepared statements. Is this normal? For example: > > $declare loop1 cursor with

Re: [SQL] Numerical variables in pqsql statements

2005-08-29 Thread Thomas F. O'Connell
Michael, PL/pgSQL variable interpolation works similarly to that in other popular programming languages. If you have a statement -- whether it's PERFORM, SELECT INTO, or EXECUTE -- a variable will get interpolated during parsing if not escaped in a string. Per the documentation, dynamic v

[SQL] sqlstate 02000 while declaring cursor/freeing prepared statements

2005-08-29 Thread andy rost
I'm new to the PostgreSQL community so please pardon what is probably a silly question. Also, this is my first attempt at posting so you might have seen this already (Sorry!) ... I'm in the process of porting Informix ESQL to PostgreSQL. I occasionally get sqlcode = 100 and sqlstate = 02000 wh

Re: [SQL] Negative lookbehind assertions in regexs

2005-08-29 Thread Bruno Wolff III
On Mon, Aug 29, 2005 at 14:11:37 +0100, Julian Scarfe <[EMAIL PROTECTED]> wrote: > I'd like a regex that matches 'CD' but not 'ABCD' in any part of the regex. > > Is there a workaround that allows me to do this as a single regex? > > I know I could and together a ~ and !~ like this > > # selec

[SQL] Negative lookbehind assertions in regexs

2005-08-29 Thread Julian Scarfe
I'd like a regex that matches 'CD' but not 'ABCD' in any part of the regex. In Perl I'd use a negative lookbehind assertion (?Julian ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] PostgreSQL help

2005-08-29 Thread PFC
Check your database encoding, client encoding, and the encoding you use in your file. If your database is UNICODE, pgadmin will convert accordingly, but your file has to be in the right encoding. On Mon, 29 Aug 2005 12:27:41 +0200, Shavonne Marietta Wijesinghe <[EMAIL PROTECTED]> wrote:

[SQL] PostgreSQL help

2005-08-29 Thread Shavonne Marietta Wijesinghe
Hey!! I have a problem and i hope this is the correct section to post it!!! When i use the COPY Table Name FROM Location command to insert values to a table using a txt file, the programme gives me errors when he finds letter as "ò, è, à" inside the txt file. But when i use the insert command