Re: [SQL] autocommit

2004-03-26 Thread Tom Lane
Kemin Zhou <[EMAIL PROTECTED]> writes: > Could we add one simple switch to psql (the client front end or the > library) --noautocommit? psql already has this, see \set AUTOCOMMIT. regards, tom lane ---(end of broadcast)---

[SQL] autocommit

2004-03-26 Thread Kemin Zhou
This might be a wish list or add feature. Could we add one simple switch to psql (the client front end or the library) --noautocommit? This will require you to type commit at the end of a query. Most of the time I would be using psql to do simple stuff. Some times I need to update databases.

Re: [SQL] Invalid Unicode Character Sequence found

2004-03-26 Thread Tom Lane
"Bulatovic Natasa" <[EMAIL PROTECTED]> writes: > select id, title from docs where title like 'z%'; or > select id, title from docs where title like 'Z%'; > It reports the following error: > ERROR: Invalid UNICODE character sequence found (0xc000) This is fixed in 7.3.6.

Re: [SQL] order of results

2004-03-26 Thread Bruno Wolff III
On Thu, Mar 25, 2004 at 14:23:00 +0100, Gregor Rot <[EMAIL PROTECTED]> wrote: > Hi, > > i have a table called "people" (name:varchar, lastname:varchar). > > i do a select on it: > > select * from people where name like '%n1%' or lastname like '%l1%'. > > i would like the results in this order

Re: [SQL] date_part stored procs

2004-03-26 Thread Tom Lane
"Tsoloane Moahloli" <[EMAIL PROTECTED]> writes: > SELECT INTO len * FROM (SELECT > ((date_part(''year'',age(docDate))*12)+(date_part(''month'',age(docDate > AS a; > The problem is that it does not run and I cannot for the life of me tell > why. I think you miscounted parentheses.

[SQL] date_part stored procs

2004-03-26 Thread Tsoloane Moahloli
Title: Message Making me lose my cool.  Here is how it goes:   I have the following Stored Proc, Which I intend to find the age in months of a date...     CREATE FUNCTION interval_months(TIMESTAMP) RETURNS INTEGER AS ' DECLARE  docDate ALIAS FOR $1;  len INTEGER; BEGIN  SELECT INTO len * FR

[SQL] order of results

2004-03-26 Thread Gregor Rot
Hi, i have a table called "people" (name:varchar, lastname:varchar). i do a select on it: select * from people where name like '%n1%' or lastname like '%l1%'. i would like the results in this order: first the results that satisfy only the (name like '%n1%') condition, then the ones that satis

[SQL] Invalid Unicode Character Sequence found

2004-03-26 Thread Bulatovic Natasa
Hi All, One very strange problem within the PostgreSql database. When you issue the following command: select id, title from docs where title like 'z%'; or select id, title from docs where title like 'Z%'; It reports the following error: ERROR: Invalid UNICODE character sequence found (0xc000

Re: [SQL] Database reporting tool

2004-03-26 Thread Bill
Hi Jerome - We have developed a web based ad hoc report builder (LGX Ad Hoc) that seems to fit your requirements rather well at first glance. http://www.logixml.com/products/AdHoc/adhoc.htm LGX Ad Hoc is a zero footprint .NET and XML based web application. It provides both an end-user and admini

Re: [SQL] Import from Ms Excel

2004-03-26 Thread Hans de Bruin
Kumar wrote: Dear Friends, Is possible to import data from MS Excel sheet into postgres database 7.3.4 running on Linux 7.2 Install the postgress ODBC drivers. Create a new access database. Create two linked tabels, one to a table in de database and one to the excel sheet. Use a insert into

Re: [SQL] Newbie Query question

2004-03-26 Thread Rod Taylor
> However, this query does not give me the result I expected. It appears that > the database engine first calculates the cartesian product of the tables A > and B and then evaluates the query. Hence, I get multiple matches for Yup.. WHERE filters the results of the join. > Is there any way to do

Re: [SQL] could not create shared memory segment: Invalid argument

2004-03-26 Thread xvx
I'am also getting this same problem with 10.3.3 Server. Worked fine with 10.3.2. kern.sysv.shmmax: 4194304 kern.sysv.shmmin: 1 kern.sysv.shmmni: 32 kern.sysv.shmseg: 8 kern.sysv.shmall: 1024 Those are the Values i get from the command posted. Have you figured out a fix for this error? Thanks

[SQL] Newbie Query question

2004-03-26 Thread Marcel Loose
Hi all, I have the following problem which I will illustrate with a simplified example. I have two tables A and B. Both tables contain three columns named "objid", "owner", and "val" all of type integer. I want to select all records in A for which A.val=0 and all records in B for which both B.val

Re: [SQL] how to turn off autocommit in psql

2004-03-26 Thread Paul Thomas
On 26/03/2004 01:25 Kemin Zhou wrote: I search far and wide and found a lot of disscussions about the autocommit, but none about how to do it. After reading 50 pages, my brain is numb. Could any one give me a simple help? Thanks Kemin Use tranactions. -- Paul Thomas +--