Re: [SQL] Joining a result set from four (4) tables

2006-08-01 Thread John Tregea
remains the same. I hope to increase interoperability in this way as well. Thanks again for your help. Kind regards John T. Aaron Bono wrote: First of all, I must say it is very unfortunate that all the tables have the same name for their primary key column. It made things confusing at

Re: [SQL] Joining a result set from four (4) tables

2006-08-02 Thread John Tregea
I want to do the joins. Thanks again for your help. Regards John T Aaron Bono wrote: We all find ourselves in different situations and because of that, what works for one person, doesn't work for another - so I understand. Good luck with the application and future queries. Maybe

Re: [SQL] [PHP] PL/pgSQL and PHP 5

2006-08-09 Thread John DeSoi
have different capitalization. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] [PHP] PL/pgSQL and PHP 5

2006-08-09 Thread John DeSoi
ike a normal PHP method call: $connection->insert_staff_b($staff['insert_firstname']); John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [SQL] ERROR: SELECT query has no destination for result data

2006-08-31 Thread John DeSoi
base.emissor_ponto_venda where id = PontoVenda_Emissor; See http://www.postgresql.org/docs/8.1/interactive/plpgsql- statements.html#PLPGSQL-SELECT-INTO John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast

Re: [SQL] ERROR: SELECT query has no destination for result data

2006-08-31 Thread John DeSoi
one value: select into num_em_pdv id from base.emissor_ponto_venda where id = PontoVenda_Emissor; John On Aug 31, 2006, at 10:07 AM, Ezequias Rodrigues da Rocha wrote: Thank you John, It only works using records. I don't know why. When I put ('works well'): sele

[SQL] How to aggregates this data

2007-01-10 Thread John Summerfield
Now I've figured why I don't get replies, I'm sending again. Intro: I have a table that contains much data like this: SELECT distinct on (date) asx_code,date,open,high,low,close from sales_summaries where asx_code = 'TLSCA' and date >= '2006-12-01' order by date, time desc limit 10; SELECT d

Re: [SQL] Some help with functions-syntax

2007-01-17 Thread John DeSoi
, Jan Meyland Andersen wrote: I have some problem with writing a function. I have made this function which I can't get it to work. This is probaly a triviel question but i'm new to plsql, so this is a showstopper for me. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for

Re: [SQL] Some help with functions-syntax

2007-01-18 Thread John DeSoi
x27;select ...' _sql := _sql + ' where ...' But using the form without execute is much better. PostgreSQL will only have to plan the query the first time it is called. Using EXECUTE is much less efficient. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL -

Re: [SQL] How to query by column names

2007-01-23 Thread John Summerfield
Jeff Frost wrote: On Tue, 23 Jan 2007, Josh Williams wrote: From: Jeff Frost <[EMAIL PROTECTED]> On Mon, 22 Jan 2007, Richard Ray wrote: ... That's definitely part of it. I'm assuming the above is an abridged example and the OP is doing something dynamic with the query. The real trouble

Re: [SQL] How to query by column names

2007-01-23 Thread John Summerfield
John Summerfield wrote: Jeff Frost wrote: On Tue, 23 Jan 2007, Josh Williams wrote: From: Jeff Frost <[EMAIL PROTECTED]> On Mon, 22 Jan 2007, Richard Ray wrote: ... That's definitely part of it. I'm assuming the above is an abridged example and the OP is doing something

Re: [SQL] Seeking quick way to clone a row, but give it a new pk.

2007-02-08 Thread John DeSoi
, but get a new primary key for the copy? I'd then go in an edit the 1 or 2 additional columns that differ. The duplicate would be in the same table as the original. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broa

Re: [SQL] How to store a password encripted in a user defined table

2007-03-01 Thread John DeSoi
e: Thanks Andrej. But how can I use such algoritms in postgresql? arey they defined in a function that I can call? Or, do I have to code one of those algorithm to use it in my application? John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of

Re: [SQL] Using a variable as a view name in a select

2007-04-03 Thread John Summerfield
Wilkinson, Jim wrote: I have created a view, called april_may. I need to select this view by combineing to fields in the database to create the view name etc ... Jim Learn to use "compose" or "write" and not "reply" when you want to ask a fresh question. My email rolled this into the "LOCK"

[SQL] A long-running transaction

2007-04-03 Thread John Summerfield
I have a Java (java 1.1) program that I wrote some years ago, to read records from a text file and insert it into a ostgresql database. One of the assumptions I made was that one file contained one day's data, maybe as many as 1500 records, and I coded it to do the whole lot as one transaction

Re: [SQL] plpgsql function question

2007-04-03 Thread John DeSoi
It should work pretty much like you have it. You don't need a type; the table is already a type. Something like: create or replace function a_func (in p_row a) returns int as $$ if p_row.i ... if p_row.j ... $$ If it does not work, show the error and I'll try to dig up an exam

Re: [SQL] plpgsql function question

2007-04-04 Thread John DeSoi
, 2007, at 1:01 AM, A. Kretschmer wrote: Because your function expects one parameter of your new type, you have to CAST your data into this type: test=# select * from my_a((1, 'foo', current_date)::a); my_a -- 1 (1 row) John DeSoi, Ph.D. http://pgedit.com/ Power Tools for

Re: [SQL] A long-running transaction

2007-04-10 Thread John Summerfield
Andrew Sullivan wrote: On Tue, Apr 03, 2007 at 10:16:13PM +0800, John Summerfield wrote: It is hitting the disk pretty hard now on this machine, but the laptop's still going too, and the disk seems to run about half the time, part of a second running, part idle (but the intervals are ge

Re: [SQL] A long-running transaction

2007-04-10 Thread John Summerfield
Andrew Sullivan wrote: On Wed, Apr 11, 2007 at 12:41:23AM +0800, John Summerfield wrote: The Linux kernel's clearly doing a lot of work, and the disk supports You might also be into context-switch hell. What processor, which kernel, and which Postgres version again? on opensuse 10.2

Re: [SQL] A long-running transaction

2007-04-11 Thread John Summerfield
Andrew Sullivan wrote: On Wed, Apr 11, 2007 at 05:54:45AM +0800, John Summerfield wrote: Linux caches writes, I don't think it should be hitting disk at all. The I _sure hope_ you don't care about this data, then. That's not a real safe way to work. But. . . As I said in

Re: [SQL] A long-running transaction

2007-04-12 Thread John Summerfield
Andrew Sullivan wrote: On Wed, Apr 11, 2007 at 10:23:34PM +0800, John Summerfield wrote: Each row's identified by a key, and the key doesn't change. That doesn't matter. ADABAS would put the updated record right back where it came from, it That isn't how PostgreSQ

Re: [SQL] plpgsql array looping

2007-04-25 Thread John DeSoi
One problem (unless you intend to only look at every other element) is that you are incrementing idxptr explicitly in your loop. The FOR loop does that for you. This is the reason your output shows only even values. John On Apr 24, 2007, at 4:42 PM, Richard Albright wrote: for

Re: [SQL] hi

2007-05-06 Thread John Summerfield
Penchalaiah P. wrote: Information transmitted by this e-mail is proprietary to Infinite Computer Solutions It may be proprietary, but it shore ain't confidential! ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore y

Re: [SQL] PL/PGSQL Record type question

2007-05-11 Thread John DeSoi
parameters so you don't need the CREATE TYPE statement. On May 11, 2007, at 10:42 AM, Gábriel Ákos wrote: You might be looking for PostgreSQL RECORD data type. Thanks. Give me an example please. I saw the documentation already. John DeSoi, Ph.D. http://pgedit.com/ Power Tool

Re: [SQL] doubt

2007-05-19 Thread John DeSoi
7;, 'pg_toast') AND pg_catalog.pg_table_is_visible(c.oid) ORDER BY 1,2; ** List of relations Schema | Name | Type | Owner +--+--+--- public | barcode

[SQL] FATAL: cache lookup failed for function 1003

2007-05-23 Thread John Summerfield
Is this the right list for this? I'm off the 'net atm and can't easily check. I'm running on self-built RHEL 4. I built from cvs this morning, and get the above error. Running grep over the source doesn't show anything helpful to me. The initdb command (sans --auth) works for psql (PostgreSQL)

Re: [SQL] FATAL: cache lookup failed for function 1003

2007-05-23 Thread John Summerfield
Alvaro Herrera wrote: John Summerfield wrote: Is this the right list for this? I'm off the 'net atm and can't easily check. I'm running on self-built RHEL 4. I built from cvs this morning, and get the above error. Running grep over the source doesn't show anything

[SQL] joining a table whose name is stored in the primary record

2007-06-17 Thread John Gunther
ight conceptual direction. Thanks. John Gunther Bucks vs Bytes Inc ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through

Re: [SQL] joining a table whose name is stored in the primary record

2007-06-19 Thread John Gunther
Andrew Sullivan wrote: On Sun, Jun 17, 2007 at 04:39:51AM -0400, John Gunther wrote: functions and using subqueries without success. I think I need someone to point me in the right conceptual direction. Well, the right SQL-esque conceptual direction is not to have

Re: [SQL] joining a table whose name is stored in the primary record

2007-06-19 Thread John Gunther
loop; end; $$ language plpgsql; Thanks, Andrew. I was hoping for a pure SQL solution but your idea will certainly work. John ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] yet another simple SQL question

2007-06-26 Thread John Summerfield
Joshua wrote: Ok, You guys must be getting sick of these newbie questions, but I can't resist since I am learning a lot from these email I'm not fond of people using meaningless subjects, or of people simultaneously posting the same message to other lists. If one chooses a meaningless subj

Re: [SQL] yet another simple SQL question

2007-07-01 Thread John Summerfield
Michael Glaesemann wrote: On Jun 26, 2007, at 2:19 , Achilleas Mantzios wrote: ΣÏ?ιÏ? ΀Ï?ίÏ?η 26 Î?οÏ?ΜιοÏ? 2007 09:40, ο/η John Summerfield έγÏ?αÏ?ε: Subjects such as yours don't cut the mustard. Try to summarise your problem; if I'm interested in the problem t

[SQL] How do I connect postgres table structures and view structures to an existing svn repository?

2007-08-01 Thread John Mitchell
Hi, How do I connect postgres table structures and view structures to an existing svn repository? Thanks, -- John J. Mitchell

Re: [SQL] How do I connect postgres table structures and view structures to an existing svn repository?

2007-08-01 Thread John Mitchell
similar to what I currently do with source code that I have for a web app within eclipse. On 8/1/07, D'Arcy J.M. Cain <[EMAIL PROTECTED]> wrote: > > On Wed, 1 Aug 2007 10:07:31 -0400 > "John Mitchell" <[EMAIL PROTECTED]> wrote: > > How do I connect postgr

[SQL] postgresql HEAD build failure

2007-09-09 Thread John Summerfield
free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [EMAIL PROTECTED] ~]$ Please don't reply off-list. Should I report this as a bug? -- Cheers John Summerfield --

Re: [SQL] postgresql HEAD build failure

2007-09-09 Thread John Summerfield
Alvaro Herrera wrote: John Summerfield wrote: I have, for some months, been running this daily, but not taking notice of the results: [EMAIL PROTECTED] ~]$ cat bin/pg_build #!/bin/bash set -xe cd /home/pgtest/pgsql/pgsql-2007-04-23/ ping -c4 2>/dev/null anoncvs.postgresql.org | grep -q &#x

Re: [SQL] Extracting hostname from URI column

2007-09-18 Thread John Summerfield
Paul Lambert wrote: Paul Lambert wrote: chester c young wrote: I'm trying to use substr() and position() functions to extract the full host name (and later a domain) from a column that holds URLs. substring( href from '.*://\([^/]*)' ); Ok, your solution looks better than mine... but I hav

[SQL] Intermittent Empty return

2007-09-22 Thread John Mulkerin
t just seems that 95% of time I get nothing back. Even if I type "SELECT * from trash", It returns nothing and I can't find any table called trash. I've searched the list archives but haven't found any solution to my problem. Can anyone suggest

Re: [SQL] Intermittent Empty return

2007-09-22 Thread John Mulkerin
sults; ERROR: parser: parse error at or near "select" at character 30. Maybe another reason I need to upgrade? Tom Lane wrote: John Mulkerin <[EMAIL PROTECTED]> writes: I'm new to Postgres. I'm trying to select data from my survey_results table. My server is runnin

Re: [SQL] Intermittent Empty return

2007-09-23 Thread John Mulkerin
Thanks a lot. Scott Marlowe wrote: On 9/22/07, John Mulkerin <[EMAIL PROTECTED]> wrote: I agree its old. I'm working on the upgrade but first need to verify and then purge some data. I tried with and without a semicolon However, with a semicolon results in Just tried semi

Re: [SQL] UTF8 encoding and non-text data types

2008-01-15 Thread John Hasler
Joe writes: > The Arabic language is written right-to-left, except ... when it comes to > numbers. Perhaps they read their numbers right to left but use a little-endian notation. -- John Hasler [EMAIL PROTECTED] Elmwood, WI USA ---(end of bro

Re: [SQL] accounting schema

2008-02-07 Thread John Hasler
Look at LedgerSMB at . It uses Postgresql. -- John Hasler [EMAIL PROTECTED] Elmwood, WI USA ---(end of broadcast)--- TIP 6: explain analyze is your friend

[SQL] Sequential non unique IDs

2008-04-01 Thread John Reeve
n't be the first time anyone has ever tried to do this. Thanks! - John

Re: [SQL] Sequential non unique IDs

2008-04-06 Thread John Reeve
. Thanks again! - John -Original Message- From: Craig Ringer [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2008 9:24 PM To: John Reeve Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Sequential non unique IDs John Reeve wrote: > I've already considered: > 1. I can'

Re: [SQL] Copyright and Paper walls

2008-07-12 Thread John Hasler
oked at their docs or not, or it isn't, in which case they have no grounds for action. There is nothing wrong with discussing Oracle's features or even deliberately duplicating them. -- John Hasler [EMAIL PROTECTED] Elmwood, WI USA -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql

[SQL] UPDATE and DELEte with a lot of register is to slow...

2008-11-20 Thread John Dizaro
I have to execute some times an UPDATE an some times a DELETE to register +- 5 , every time when i do that the database be to slow do we any way to DELETE or UPDATE by part??? Thanks -- John Evan Dizaro -

Re: [SQL] UPDATE and DELEte with a lot of register is to slow...

2008-11-21 Thread John Dizaro
The problem is ... how to run the SCRIPT to the few? not all the 5 lines of "update" at the same time. John Evan Dizaro 2008/11/20 John Dizaro <[EMAIL PROTECTED]> > I have to execute some times an UPDATE an some times a DELETE to > register +- 5 , every ti

Re: [SQL] simple text parsing function

2008-11-22 Thread John DeSoi
t rtrim('BPZ8 CURNCY ') like '%CURNCY'; --> true select rtrim('BPZ8 CURNCY ')::char(25) like '%CURNCY'; --> false Interestingly, it works if you make your comparison using ~ '.*CURNCY' John DeSoi, Ph.D. -- Sent via pgsql-sql mailin

[SQL] Full text search ordering question

2008-11-25 Thread John Lister
Hi, is it possible to order the results of a full text search using another field? for example with the following table: CREATE TABLE breadcrumbs ( node_id integer NOT NULL, breadcrumb character varying, textsearchable tsvector, views integer, CONSTRAINT pk_breadcrumbs PRIMARY KEY (node_id

Re: [SQL] Full text search ordering question

2008-11-25 Thread John Lister
ou can see it sorts the full result set from the search. Ideally i'd like to use an index on the views. How stable is 8.4? Is it worth trying that or is the multi-column gin likely to be back-ported? Thanks John, it's a good tradition to include query and their EXPLAIN ANALYZE. P

Re: [SQL] UPDATE and DELEte with a lot of register is to slow...

2008-11-28 Thread John Dizaro
desenpenho. Obrigado 2008/11/20 John Dizaro <[EMAIL PROTECTED]> > I have to execute some times an UPDATE an some times a DELETE to > register +- 5 , every time when i do that the database be to slow > do we any way to DELETE or UPDATE by part??? > Thanks > &g

[SQL] how to update 400 000 register not at the same time?

2008-12-01 Thread John Dizaro
I Have um very big table with primary key and all i nead. When i update same register from this table it comes sj=low. Can i Update all my 400 000 register not at the same time? By steps? Thanks -- John Evan Dizaro Software - Fone: (41) -0303 Fone: (41) 9243-3240 Rua: Alferes Poli

Re: [SQL] adding "order by" to a "group by" query

2008-12-06 Thread John Lister
>(still curious about the "must be used in an aggregate function" error >though... because I do use it in an aggregate) You're original query grouped on the person id and name, therefore you can only return (and order by) these functions or the result of an aggregate function on other columns

Re: [SQL] Best way to "and" from a one-to-many joined table?

2008-12-08 Thread John Lister
I guess it depends on the optimiser and how clever it is. With the former the db will probably generate 2 sets of ids for the 2 joined tables (a, b) which only contain the values you require, these lists are probably much smaller than the total number of rows in the table therefore any merges a

[SQL] Question on Escape-string

2008-12-31 Thread John Zhang
string is escaped it becomes 'C:\tmp\tst.tif' as expected -- the file name need be passed in to lo_import() function again without double \\ -- when it is passed in and escaped , the \ is gone and the filename becomes meaningless Any input would be much appreciated! Thanks a lot John

[SQL] How to excute dynamically a generated SQL command?

2009-01-03 Thread John Zhang
of input LINE 1: ...E'C:\\HM\\Data\\Flightmap.tif') ^ I would appreciate a lot if you offer your input. Thanks a lot. John

Re: [SQL] Grass Root Protectionism

2009-02-08 Thread John Hasler
trade, is a positive sum game. > It is US people who are benefitting more from the relationship, not > non-US people. All are benefitting. The notion that someone is "winning" and therefor someone else must be "losing" is the OP's false thesis. -- John Hasler j...

Re: [SQL] Grass Root Protectionism

2009-02-08 Thread John Hasler
D'Arcy J.M. Cain writes: > Hey buddy, I know what I, a non-American, have done for this project. > What have you done? I expect that this guy would tell you that all Free Software is evil and takes food out of the mouths of his children. -- John Hasler j...@dhh.gt.org Elmwood, WI US

[SQL] temp tables versus normal tables

2009-02-16 Thread John Lister
into" and bypass the table althogether but i'm guessing this would be slower as the data would need to be looked up each time the view is used for the subsequent processing steps.. Any thoughts Thanks JOHN -- Got needs? Get Goblin'! - http://www.pricegoblin.co.uk/

[SQL] Add column by using SELECT statement

2009-02-24 Thread John Zhang
tblA.Id=tblB.Id Any advice? Any input would be much appreciated. Thanks a lot John

Re: [SQL] pl/pgsql or control structures outside of a function?

2009-04-03 Thread John DeSoi
CASE might work for you. http://www.postgresql.org/docs/8.3/interactive/functions-conditional.html John DeSoi, Ph.D. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Need a script that bakes INSERT script from SELECT results

2009-04-16 Thread John DeSoi
ction test () returns void as $$ declare rec record; begin for rec in select * from whatever loop insert into some_table values (rec.*); end loop; end; $$ language plpgsql; John DeSoi, Ph.D. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.or

Re: [SQL] Comparing two tables of different database

2009-05-01 Thread John Zhang
Hi Nicholas, The query is across database query. dblink is needed for that task. Hope it helps, John On Thu, Apr 30, 2009 at 3:07 PM, Edward W. Rouse wrote: > Can’t you use this? > > > > select name from database2.sr_1 where name not in (select name from > database2.pr_1

[SQL] Query planning question

2009-05-11 Thread John Lister
Doing the following query select distinct m.id, m.name from manufacturer_manufacturer m join product_product p on (p.manufacturer_id=m.id) join retailer_offer o on (o.product_id=p.id) where o.retailer_id=XXX and o.active results in one of 2 query plans depending upon the v

Re: [SQL] Query planning question

2009-05-11 Thread John Lister
"John Lister" writes: Am I right in assuming the planner thinks a sequential scan is quicker than 10k index hits, would tweaking the costs fix this or would i be better updating the stats for the product_id and manufacturer_id fields? AFAICT the planner did exactly the right t

[SQL] Pgadmin hotkeys?

2009-05-25 Thread John Dizaro
Can somebody tell me please where i can find the PgAdmin Hotkey like Ctrl+SPACEBAR and others?? Tanks for all. -- John Evan Dizaro - Fone: (41) -0303 Fone: (41) 9243-3240 Rua: Alferes Poli Curitiba - PR - Brasil

[SQL] Re: Simple search question

2000-06-12 Thread John McKown
. I have not yet gotten anything running with PHP (lack of time to "play"), so I can't test this. If it doesn't work, I'd try using pg_GetLastOid() to get the OID of the inserted row. The use the pg_Exec and SELECT * WHERE OID=oid-value, followed by pg_fetch_row(). Just some thoughts. John

[SQL] Re: Simple search question

2000-06-13 Thread John McKown
lue, followed by pg_fetch_row(). > >Thanks John, and the other person that replied to my email (I know it is a >bit of a stupid question, but in such an unpopulated list, I don't think >there's any reason to post privately). > This leads to another question. If someone adds anot

[SQL] Re: Simple search question

2000-06-20 Thread John McKown
a new tuple, the attribute defined as SERIAL actually got the value of 1000. Curious, but nice. John McKown (note - not! Jack, but John)

[SQL] case-sensitivity and the serial type

2000-07-14 Thread John BEPPU
I've been using the debian package of postgresql (7.0-release-1) and I've been able to say something like: create table blah ( id serial ); Note how serial is all lowercase. I have since compiled postgresql 7.0.2 on my friends box and installed it in my home directory so I could play w/ it.

[SQL] nevermind...

2000-07-14 Thread John BEPPU
Nevermind my last post. I'm still confused, but for different reasons. I'm on my friends box, and I have screen running. In one tty, creating tables with the serial type works, but in the other tty, it fails. Both shells are on the same box, so it must be some kind of environment issue (or that

Re: [SQL] Transactions

2000-07-28 Thread John McKown
On Fri, 28 Jul 2000, Carolyn Lu Wong wrote: > Does postgreSQL support nested transactions? > no.

Re: [SQL] Extracting data by months

2000-08-03 Thread John McKown
you the result you wanted. John On Thu, 3 Aug 2000, Antti Linno wrote: > Lo. > > I'm in dire need of knowledge, how to extract data by month. Monthday > and year arent' important, those I can't give from perl script, but what > I do give to postgres are the number

Re: [SQL] Week of the Year?

2000-08-11 Thread John McKown
ct now()-date_part('dow',now()); This last select gives the Sunday for the current week. To get the Saturday, simply: select now()-date_part('dow',now())+6; Of course, replace the now() with whatever contains the date or timestamp. John McKown > I'm probably staring

Re: [SQL] Week of the Year?

2000-08-12 Thread John McKown
Sorry, I don't speak TCL or TK. I've got a book on it, but I haven't had any time or pressing need to get familiar with it. I'm learning Python & PHP. Well, at least I'm trying to whenever I can find a spare moment (which is rare). On Sat, 12 Aug 2000, David Lloyd-Jo

Re: [SQL] Operator Precedence problem?

2000-08-12 Thread John McKown
Every language that I've ever used (other than APL) has the precedence of "or" being less than "and". So I would always expect the "and" clauses to be evaluated first, then the "or". Just like in math, where in an equation, I expect that the multiplication (and) is done before the addition (or). U

[SQL] Bug in psql - Postgresql 7.3.1?

2003-10-03 Thread John B. Scalia
Postgresql 7.3.1 on Solaris 9. Problem originally seen during a php4 script, but has been duplicated on the psql command line.   TIA, John

[SQL] query using a date field that isn't set

2004-11-07 Thread John B. Scalia
quit. Everything I’ve tried returns no rows.   Anybody? -- John

Re: [SQL] Nested custom types: array - unable to insert [SOLVED]

2011-12-30 Thread John L. Poole
On 12/30/2011 7:31 PM, David Johnston wrote: On Dec 30, 2011, at 21:53, John Poole wrote: I am trying to create a custom data type for phone numbers where I have a primary phone number and then an array of additional phone numbers qualified by certain types. Below is a set of SQL commands

[SQL] obtaining column names from tables or views

2007-11-28 Thread John van Zantvoort
is rather expensive, silly and fails when the table or view is empty. -- Met vriendelijke groeten/with kind regards John van Zantvoort --- Most burning issues generate far more heat than light. -BEGIN GEEK CODE BLOCK- Version: 3.12 GCM d-- s:+ a C++ UL P+++ L++ E--- W++ N+ o-

[SQL] Accessing elements of bytea[] always returns NULL

2008-10-01 Thread Sestak, John S
2; hashes[1][0] = 3; hashes[1][1] = 4; java.sql.Array byte_array = connection.createArrayOf("bytea", hashes); cs.setArray(2, byte_array); cs.execute(); } catch( Exception e) { log.error("Error: Caught exception - " + e.getMessage()); } finally { if (cs != null) { cs.close() } } } Thank you, John

<    1   2   3