[SQL] FTI, paged, ranked searching and efficiency.

2000-11-14 Thread Paul
issed something obvious that will help me? Or better yet, can someone who has done this sort of thing before tell me whether I am on the right track? Paul

Re: [SQL] variables in SQL??

2000-08-16 Thread Volker Paul
> what im trying to do is have a Sum of a colum.. as it goes forwards with the > cursor.. > like so: > > Price|Sum > 5|5 > 4|9 > 10|19 > 2|21 > 7|28 I think what you mean is called running sum, I had the same problem before, and I found no other solution than creating a column for it, and calcul

Re: [SQL] how to store a query, that results in a table

2000-09-23 Thread Paul Wehr
e out any way to do it. If anyone in the know is screaming out loud at this technique, please point me in the right direction, I would love to be able to skip the "Insert into effective_date..." step. -paul Keith Wong wrote: > This is not really possible with postgresql at the

[SQL] Create table doesn't work in plpgsql

2000-12-19 Thread Volker Paul
Hi, can I do some table manipulation in plpgsql? Look at only the "create table" line and the error message: create function plural (text) returns text as ' begin create table tmp (num int4); return $1 || ''s''; end;' language 'plpgsql'; select plural('test'); CREATE ERROR: cop

Re: [SQL] Create table doesn't work in plpgsql

2000-12-21 Thread Volker Paul
see a possibility that is closer to Postgres, e.g. in plpgsql? Volker Paul

Re: [SQL] Invoice number

2000-12-21 Thread Volker Paul
Hi, > I'm wondering how people creates guaranteed sequential numbers - in my case > for invoice numbers. See the PostgreSQL book p. 85 and 250, and the online doc about serials: CREATE TABLE person ( id SERIAL, name TEXT ); Volker Paul

Re: [SQL] Create table doesn't work in plpgsql

2000-12-22 Thread Volker Paul
> Can this be done using tcl or perl? I'll try them and report what I find out. V.Paul

Re: [SQL] select returns no line

2001-01-23 Thread Volker Paul
A space or something like that is also what I was thinking of. I'd suggest to: select * from users, length(user_login) where user_id=4; before and after the update. V.Paul

Re: [SQL] postgres's users take on onlamp

2001-02-12 Thread Volker Paul
Well, maybe if Postgres' name was Mostgres, the "M" would stand for Mostgres instead of MySQL ... V.Paul clayton cottingham wrote: > > heya: > just wondering if anyone has any comments on this > > onlamp is o'rielly's new ideal > that ,really, has been in use for quite a while > > its anacro

[SQL] C/C++ interface

2001-02-13 Thread Volker Paul
the version without cursor, so I get no information whether the query succeeded. Is someone maintaining the C++ interface and its documentation? Thanks, Volker Paul

Re: [SQL] C/C++ interface

2001-02-15 Thread Volker Paul
Tom Lane wrote: > > Volker Paul <[EMAIL PROTECTED]> writes: > > Is someone maintaining the C++ interface and its documentation? > > Not really. Feel free to step up and lend a hand ... I found some functions of the C++ binding library that are not or scarcely d

[SQL] Temp tables being written to disk. Avoidable?

2001-08-14 Thread Paul McGarry
tables sit in memory. Hmm, I should to do some proper benchmarking on this rather than worrying about the noises coming from the disks.. However, even if the original method does turn out to be faster, I imagine it could be faster still without the disk writes (though I don't know anywhere nea

RE: [SQL] Temp tables being written to disk. Avoidable?

2001-08-14 Thread Paul McGarry
nsive. I imagine that could vary heavily on the contents of the tables and the number of concurrent searches that are occuring. Thanks again. -- Paul McGarrymailto:[EMAIL PROTECTED] Systems Integrator http://www.opentec.com.au Opentec Pty Ltd http://www.iebusiness.com.a

RE: [SQL] Temp tables being written to disk. Avoidable?

2001-08-16 Thread Paul McGarry
temp table, which is been using fairly frequently and makes the thing grind away. -- Paul McGarrymailto:[EMAIL PROTECTED] Systems Integrator http://www.opentec.com.au Opentec Pty Ltd http://www.iebusiness.com.au 6 Lyon Park RoadPhone: (02) 9870 4718 North Ryde NS

[SQL] Help needed

2002-08-28 Thread Mowat, Paul
Dear postgresql, I am just starting to learn SQL. I have attached a script that allows me to create some tables and indexes. I have rows that are inserted into the tables.   I need some help with creating multiple subqueries and table joins, (six or seven table joins). Can you help? Paul

[SQL] Inconsistent or incomplete behavior obverse in where clause

2002-11-12 Thread Paul Ogden
be a problem? We are looking to maintain a high degree of portability in our application code, and while "CAST ( expression as type )" is fairly portable, no one here feels that it is a portable as column reference = literal/constant value. If someone knows of a better approach, or ca

[SQL] RE: [SQL] System´s database table

2002-11-13 Thread Paul Ogden
It's not ERD but I've found the information in the Developer's Guide regarding system catalogs to be useful in the past. This http://www.postgresql.org/idocs/index.php?catalogs.html will get you started. Thanks, Paul Ogden Claresco Corporation > -Original Message--

Re: [SQL] Inconsistent or incomplete behavior obverse in where

2002-11-12 Thread Paul Ogden
this one. This approach would certainly allow our development team to right their code one way. > > > Paul, > > > "Unable to identify an operator '=' for types 'numeric' and 'double > > precision' You will have to retype this query using an expli

Re: [SQL] numeric problems

2002-11-14 Thread Paul Ogden
Gee, this sounds familiar. See the question ( http://archives.postgresql.org/pgsql-sql/2002-11/msg00191.php ) I posted of a similar nature a couple of days ago. We decided to wait for 7.3/7.4 and in the mean time we're using CAST ( 'constant value' as numeric ). Thanks, Paul

Re: [SQL] Slow self-join on a 100 million record table

2003-01-02 Thread Paul Thornett
uery on my machine, or your version of the same query, or any number of other ideas I tried. Just to select the first word with no joins takes 5 seconds. I was surprised the secondary Filegroup didn't improve speed at all. I feel like I've been on a long journey, and ended up exactly where I st

Re: [SQL] [JDBC] maxconnection

2003-06-19 Thread Paul Thomas
On 17/06/2003 10:22 zhuj wrote: hi,all: I want to constraint the maximum number of concurrent connections to 25 in postgres jdbc driver. There are no methods for this change. How would i do? The simplest way is to use a connection pool. HTH -- Paul Thomas

Re: [SQL] Delete duplicates

2003-06-22 Thread Paul Thomas
6 | LEAGUE BRONCOS 4 | LEAGUE PANTHERS (2 rows) HTH -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-

[SQL] rule causes nextval() to be invoked twice

2003-07-22 Thread paul cannon
extval('main_id_seq') with every insert, and have the primary key be INTEGER. Thanks- -- .. | paul cannon [EMAIL PROTECTED] | | http://people.debian.org/~pik/ | ---(end of broadca

Re: [SQL] rule causes nextval() to be invoked twice

2003-07-22 Thread paul cannon
On Tue, Jul 22, 2003 at 07:47:00PM -0600, paul cannon wrote: > Until then, I'll have to make a function to do nextval('main_id_seq') > with every insert, and have the primary key be INTEGER. Nevermind- that doesn't work either! Here's the new sample code: --

Re: [SQL] How can I to solute this problem?

2003-07-29 Thread Paul Thomas
is not always closing the connection so eventually you exceed max_connections. You should always close the connection in a finally{} block so that is guaranteed that it will be closed regardless of any earlier exceptions which are thrown. HTH

Re: [SQL] How can I to solute this problem?

2003-07-29 Thread Paul Thomas
on your machine increases significantly. (and then safely increase the maximum number of connections in your configuration (both postgresql wise and app server (conn pool) wise). On Tue, 29 Jul 2003, Paul Thomas wrote: > > On 29/07/2003 07:18 LEON wrote: > > I use tomcat+linux_postgresql+jsp t

Re: [SQL] How can I to solute this problem?

2003-07-30 Thread Paul Thomas
our DriverManager.getConnection(url, user, password). HTH -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http:/

Re: [SQL] virus warning

2003-09-19 Thread Paul Thomas
o do! Fortunately my spam filters are up to scratch and I run Linux :) Others may not be so lucky. -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants

Re: [SQL] virus warning

2003-09-19 Thread Paul Thomas
g for me with a DSL line. I really feel for those on dial-up :( -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http:/

Re: [SQL] Help on update that subselects other records in table, uses joins

2003-10-29 Thread Paul Ganainm
[EMAIL PROTECTED] says... > I suggest Joe Conway's "SQL for Smarties" Surely that's Joe Celko? > or "SQL Queries for Mere Mortals" > from another author. Michael J. Hernandez, John L. Viescas Paul... -- plinehan__AT__yahoo__DOT__com C

Re: [SQL] Using UNION inside a cursor

2003-11-04 Thread Paul Ganainm
27;AA\' AND Obs_Type = \'TA\') ? Or have I missed something really obvious? Paul... -- plinehan__AT__yahoo__DOT__com C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04 W2K Pro Please do not top-post. ---(end of broadcast)--- TIP 8: explain analyze is your friend

[SQL] Arrays - a good idea?

2003-11-18 Thread Paul Ganainm
a for justifying their use? Paul... -- plinehan__AT__yahoo__DOT__com C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04 W2K Pro Please do not top-post. ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subs

Re: [SQL] Fetch a single record

2003-12-09 Thread Paul Thomas
nterested to know just how far off the mark by understanding is... -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.

Re: [SQL] How to specify the beginning of the month in Postgres SQL syntax?

2003-12-09 Thread Paul Thomas
le (very!) few PostgreSQL-specific variations from the SQL language definition. HTH -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://

Re: [SQL] Pgaccess problem

2003-12-16 Thread Paul Thomas
pgaccess/main.tcl" line 5) Can anyone Offer any advice on this problem? pgaccess is a TCL application. You need to be running under X. -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for the

Re: [SQL] [JDBC] Insert Row to ResultSet problem....java.sql.SQLException: No Primary Keys

2003-12-22 Thread Paul Thomas
driver. A total shot in the dark but do you have a primary key on the table? -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.th

[SQL] ecpg - problem compiling prepare and declare statements

2004-01-05 Thread Paul Tilles
target type and the link fails. What am I doing wrong? TIA, Paul Tilles ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[SQL] Execute permissions for stored functions

2004-01-18 Thread Paul Hart
se. Many thanks in advance for you help, Paul smime.p7s Description: S/MIME cryptographic signature

Re: [SQL] Help! Error with postgresql!

2004-02-01 Thread Paul Hart
Would you mind telling us what's in your SQL file? it seems that there's a problem in it. On 28 Jan 2004, at 05:12, [EMAIL PROTECTED] wrote: Hello, I have problem when i execute the .sql file in my psql command prompt. The error code is below: pylori=# \i log-clinique.sql CREATE psql:log-cliniqu

[SQL] SQL query

2004-02-03 Thread Paul Czubilinski
ing record should be choosed: sample | 2003-05-16 11:10:15 | en (it has mofication date later then record with id = sample and lang_id = pl) If you have any idea how to make SQL query for this, please help me. Thanx, Paul Czubilinski ---(end of broadcast)-

Re: [SQL] Index not used - now me

2004-02-09 Thread Paul Thomas
PG doing a seqscan if there's no alternative plan. All set enable_seqscan = false does is make a seqscan appear very expensive so that the planner is less likely to pick it. HTH -- Paul Thomas +--+-+ | Thomas M

Re: [SQL] Index not used - now me

2004-02-09 Thread Paul Thomas
e. How many rows are there in the table? -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-mic

Re: [SQL] where not unique

2004-03-12 Thread Paul Thomas
Something like select regno from mytable group by regno having count(stockno) > 1; might do it. HTH -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for Business | | Computer Consultant

Re: [SQL] Invalid Characters

2004-03-15 Thread Paul Thomas
me to my webpage while displaying. Regards Raman Garg Use UNICODE as the db encoding. You'll have to drop and re-create the db though. HTH -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for

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

Re: [SQL] partial unique constraint

2004-04-06 Thread Paul Thomas
retty sure I could do this with an external trigger, but am wondering about a constraint oriented approach What about create table foo (bar integer, baz boolean); create unique index foo_bar_baz on foo(bar, baz) where baz = true; -- P

Re: [SQL] problem porting MySQL SQL to Postgres

2004-04-15 Thread Paul Thomas
d comparison according to the SQL specs. You need to use the SQL OR operator e.e., (DEWEY_POINT_TENS = 0 OR DEWEY_POINT_TENS = NULL) AND ~~ Your "= NULL" tests are also not valid SQL (should be IS NULL). MySQL does not follow the specs in a number or areas. PostgreS

Re: [SQL] problem porting MySQL SQL to Postgres

2004-04-18 Thread Paul Thomas
On 18/04/2004 19:37 Markus Bertheau wrote: В Чтв, 15.04.2004, в 13:15, Paul Thomas пишет: > On 15/04/2004 11:25 Dan Field wrote: > Your "= NULL" tests are also not valid SQL (should be IS NULL). I think = NULL _is_ valid SQL, it just doesn't do what you think. It's valid

Re: [SQL] \D TO FILE

2004-05-03 Thread Paul Thomas
On 03/05/2004 12:49 Eric Anderson Vianet SAO wrote: How could I record the ´ \d table ´ command to a file? \o file HTH -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for Business

Re: [SQL] Performance issue

2004-04-27 Thread Paul Thomas
the number of dead tuples you are trying to reclaim so the vacuum is not clearing all the dead stuff out. There's plenty of stuff about this in the archives and the docs. -- Paul Thomas +--+-+ | Thomas Micro Systems Li

[SQL] v7.2 triggers and foreign keys

2004-05-20 Thread Paul Gimpelj
with these tables.   Thanks. paul  

Re: [SQL] Doubt

2004-09-28 Thread Paul Thomas
; language. When i select 'pgsql' as language for creating query, an error poping up. How to create Query using 'pgsql' language. if any new tools need to be installed. Plz rectify. Mail me back at [EMAIL PROTECTED] I bet you haven't enabled pl/pgsql use create

[SQL] Can tsearch replace ilike queries ?

2005-02-08 Thread Antony Paul
Hi all, I read in another thread about using tsearch for ilike queries. My question is can it rprovide the full ilike functionality with a better performance than ilike ?. rgds Antony Paul ---(end of broadcast)--- TIP 8: explain analyze is your

[SQL] Maximum length of a query

2005-02-08 Thread Antony Paul
Hi all, What is the maximum length allowed for a query in PG 7.3.3 ?. I need arbitrarily long queries to be executed through JDBC. rgds Antony Paul ---(end of broadcast)--- TIP 8: explain analyze is your friend

[SQL] How to know a temp table exists ?

2005-02-08 Thread Antony Paul
Hi all, If using a connection pool how to know a temp table exists ? rgds Antony Paul ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [SQL] Querying for name/value pairs in reverse

2006-07-15 Thread Paul S
ble had to include the foreign key called ErrorID that actually relates to attribute ID in the Errors table.  When your looking at miles and miles of code or reviewing JOIN syntax " a.ID = b.ErrorID" sometimes it's easier to validate if it looks like this. "a.ErroID = b.ErrorI

[SQL] Removing duplicate rows

2007-02-06 Thread Paul Lambert
definition of a table. Apologies if this is a stupid question, I'm still fairly new to Postgres so I'm not sure what system tables are available for pulling out this kind of information. Thanks in advance for any assistance you can offer. Regards, Paul. -- Paul Lambert Databa

Re: [SQL] Removing duplicate rows

2007-02-06 Thread Paul Lambert
Andrew Sullivan wrote: On Wed, Feb 07, 2007 at 07:15:02AM +0900, Paul Lambert wrote: I'm assuming the best way to get around this is to load the data into a temporary table with "copy from" and then do a "select distinct into" my real table. You might find that

[SQL] COPY FROM query.

2007-02-11 Thread Paul Lambert
CSV HEADER; COPY appraisals FROM 'c:\autodrs_appraisal_new.txt' WITH DELIMITER AS '^' CSV HEADER; I'd be greatful if anyone could explain why my copy to does not work, also greatful if anyone can offer any suggestions on a better way to do what I am doing (if such a w

Re: [SQL] COPY FROM query.

2007-02-11 Thread Paul Lambert
An INSERT INTO will fix my problem with needing the extra copy from and copy to. I'm still curious as to why i was being told I couldn't specify a relative path though. P. -- Paul Lambert Database Administrator AutoLedgers ---(end of

Re: [SQL] COPY FROM query.

2007-02-11 Thread Paul Lambert
Joe wrote: Hi Paul, On Mon, 2007-02-12 at 08:19 +0900, Paul Lambert wrote: I'm attempting to copy from a table into a file using a select query inside the copy. The following is my command: COPY (SELECT DISTINCT ON (dealer_id,appraisal_id) * FROM appraisals_temp)

Re: [SQL] COPY FROM query.

2007-02-11 Thread Paul Lambert
re the O/S gets to deal with it :) -p OK, that makes sense, cheers for the help. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 6: explain analyze is your friend

[SQL] Issue with copying data from a text file.

2007-03-19 Thread Paul Lambert
e any way to get a copy to have no quote character? I.e. read the file and put whatever is between the caret characters straight into the appropriate field exactly as is. TIA, Paul. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)---

Re: [SQL] Issue with copying data from a text file.

2007-03-19 Thread Paul Lambert
tten would require a few dozen lines of code to each extract, and theres about 40ish extracts. Plus I don't maintain that side of our code, and those that do can be a bit lazy and I'd likely be waiting months to get it done - if they even decide to do it. -- Paul Lambert Database Admin

Re: [SQL] Issue with copying data from a text file.

2007-03-19 Thread Paul Lambert
Andrej Ricnik-Bay wrote: On 3/20/07, Paul Lambert <[EMAIL PROTECTED]> wrote: The source file comes from extracts on our main application which sits inside an in-house pretending-to-be-a-dbms file system. The content of these extracts would be difficult to change - the extract program

Re: [SQL] Issue with copying data from a text file.

2007-03-19 Thread Paul Lambert
racter to form-feed which is not going to appear in the file and that appears to do the trick without any changes to the source file. Thanks, P. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 7: You can help support

[SQL] Moving a simple function to pl/pgsql (Novice question)

2007-04-03 Thread Paul Lambert
ns or rules yet. :-) (BTW: No I am not trying to get someone to do my work for me :-P - I have about 30ish triggers of various nature to convert, I just need somewhere to start so I can figure out how it's done then I can do the rest myself) TIA, P. -- Paul Lambert D

Re: [SQL] Moving a simple function to pl/pgsql (Novice question)

2007-04-04 Thread Paul Lambert
Richard Broersma Jr wrote: --- Paul Lambert <[EMAIL PROTECTED]> wrote: The purpose being when a row in a table in one database is updated, it will copy (or replicate I guess) the record into a different table into another database in the same server. (deleting said record first if it a

Re: [SQL] Windows postgres

2007-04-22 Thread Paul Lambert
Senthil wrote: Respected sir/madam, Please can you send me link of windows postgres sql download page. thanks senthil ---(end of broadcast)--- TIP 6: explain analyze is your friend http://www.postgresql.org/ftp/binary/v8.2.4/win32/ -- Paul

[SQL] Query RE using COPY

2007-05-07 Thread Paul Lambert
bad design for a database, but we'll skip that point for now) thus I am not concerned if the load procedure doesn't supply it. BTW, this is done on Weendoze. Thanks, Paul. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)-

Re: [SQL] Query RE using COPY

2007-05-07 Thread Paul Lambert
icularly if it is only one or two columns in each table that that the client doesn't need. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Query RE using COPY

2007-05-07 Thread Paul Lambert
onto my side in the near future, just looking for a workaround until then. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate

[SQL] Passing input to a view?

2007-05-09 Thread Paul Lambert
27;t find anything in the documentation that answers this, but maybe I'm not looking hard enough. Thanks in advance. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please se

Re: [SQL] pg_dump?

2007-05-14 Thread Paul Lambert
SERT INTO statements whereas copy will give you a flat delimited file. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command t

Re: [SQL] ignoring primary key violations in COPY command

2007-05-19 Thread Paul Lambert
elds in the destination table. If your record length in the load file is going to vary you may need to consider writing a program to read the data from the file and load it in. Regards, Paul. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)

[SQL] Using escape strings in an insert statement.

2007-07-02 Thread Paul Lambert
er, write two backslashes (\\). " Which one is the correct syntax and how can I make it not return anything other than a successful insert? Noob question, I know... But TIA. (Version is 8.2.3 on Weenblowz if that is of any relevance) -- Paul Lambert Database Administrator AutoLedgers ---

Re: [SQL] Using escape strings in an insert statement.

2007-07-02 Thread Paul Lambert
Michael Glaesemann wrote: On Jul 2, 2007, at 17:45 , Paul Lambert wrote: tester=# insert into testing (test_text) values ('abcE'\\'123'); This should be INSERT INTO testing (test_text) values (E'abc\123'); The help itself (ch 4.1.2.1) tells me to use double

Re: [SQL] Join question

2007-07-26 Thread Paul Lambert
done it for me again Phillip, thanks. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate

[SQL] Join question

2007-07-26 Thread Paul Lambert
customeritem amount line | abc 457ABC 10.00 sundry| abc FREIGHT 5.00 line | abc FGOIL 15.00 What would be the best method of joining to create a result-set such as this? TIA for any assistance, P. -- Paul

Re: [SQL] Assistance with a trigger

2007-07-25 Thread Paul Lambert
EDURE fn_update_so_tran(); I'm liking PostgreSQL more and more with each new thing I try :) Thanks muchly. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by dona

[SQL] Assistance with a trigger

2007-07-25 Thread Paul Lambert
d give me a starting point that would be highly appreciated. Cheers, Paul. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate

[SQL] Count of rows

2007-08-02 Thread Paul Lambert
ves a count of 1 for each table in the public schema. Can it be done or would I have to write a function? -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropr

Re: [SQL] Implementing an regex filter

2007-08-08 Thread Paul Lambert
Enrico Weigelt wrote: Hi folks, Any hints for futher optimization appreciated :) thx It doesn't look like you have any indexes - I'd add one to at least articles.title and blacklist.title to start with and probably also user_results.article_id and articles.inode_id. -- Pa

Re: [SQL] Extracting hostname from URI column

2007-09-11 Thread Paul Lambert
le.com | http://www.google.com/search?q=%s&btnI=I'm+Feeling+L ucky dictionary.reference.com | http://dictionary.reference.com/search?q=%s (10 rows) -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate

Re: [SQL] Extracting hostname from URI column

2007-09-11 Thread Paul Lambert
t that, time to consult some manuals. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Extracting hostname from URI column

2007-09-11 Thread Paul Lambert
looking for) ... and everything AFTER a slash will be omitted. Cheers, Andrej Thanks - that makes a bit more sense. I'm in the middle of reading chapter 9.3.7 of the manual - POSIX Regular Expressions - which I'm assuming is dealing with this, so it's looking clearer. -- Paul L

Re: [SQL] Extracting hostname from URI column

2007-09-11 Thread Paul Lambert
1 | dictionary.reference.com 2 | forums.mozillazine.org 1 | groups.google.com 4 | texturizer.net 11 | www.google.com 2 | www.mozillazine.org (7 rows) -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] Extracting hostname from URI column

2007-09-11 Thread Paul Lambert
Paul Lambert wrote: Just use distinct... test=# select distinct count(*),substring( href from '.*://([^/]*)' ) as domain from url group by domain order by domain; OK so distinct was redundant there... it gives the same results without it. AutoDRS=# select count(*) as occurances

Re: [SQL] Extracting hostname from URI column

2007-09-16 Thread Paul Lambert
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 have

[SQL] Quick question re foreign keys.

2007-10-23 Thread Paul Lambert
key that is conditional, i.e. only enforce the foreign key where the value in that table is not null. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Quick question re foreign keys.

2007-10-23 Thread Paul Lambert
wn that path. Cheers, P. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] request for help with COPY syntax

2007-10-24 Thread Paul Lambert
quotes will be loaded with those quote characters in the string. Something similar may help with your case. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [SQL] Quick question re foreign keys.

2007-10-24 Thread Paul Lambert
Paul Lambert wrote: It's marked not null as a result of being part of the primary key for that table which I can't really get around. I can get away with not having the foreign key though, so I'll have to go down that path. Cheers, P. Ignore this whole thread actua

[SQL] Select into with dynamic criteria in a plpgsql function

2007-10-28 Thread Paul Lambert
um. :( Can anyone offer some suggestion(s) on how can I make my function behave? Non-violent suggestions would be preferable. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] Select into with dynamic criteria in a plpgsql function

2007-10-28 Thread Paul Lambert
Paul Lambert wrote: I've got a function defined in PL/PgSQL to update some fields in a record where the criteria for pulling out some other values from a table is dynamic. I define a string called account_criteria to which I assign a normal SQL WHERE clause based on some work done earli

[SQL] Query design assistance - getting daily totals

2007-12-11 Thread Paul Lambert
anyone have any alternate suggestions that would be better still? Cheers, Paul. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

[SQL] Function result using execute

2007-12-11 Thread Paul Lambert
XECUTE command and should therefore I just be using a test of IF curr_amount IS NOT NULL? Cheers, Paul. -- Paul Lambert Database Administrator AutoLedgers - A Reynolds & Reynolds Company ---(end of broadcast)--- TIP 1: if posting/reading t

Re: [SQL] Function result using execute

2007-12-11 Thread Paul Lambert
t would be an issue. Having the test at is not null seems to be doing the job. Thanks. -- Paul Lambert Database Administrator AutoLedgers - A Reynolds & Reynolds Company ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ign

Re: [SQL] Query design assistance - getting daily totals

2007-12-11 Thread Paul Lambert
A. Kretschmer wrote: am Wed, dem 12.12.2007, um 10:34:35 +0900 mailte Paul Lambert folgendes: year_id integer month_id integer working_day integer Why this broken data types? We have date and timestamp[tz]. It's a financial application which needs to work using a concept of '

Re: [SQL] Shorthand column labels (SELECT col1 foo, ...) vs (SELECT col1 AS foo, ...)

2008-01-09 Thread Paul Lambert
Ken Johanson wrote: I notice PG doesn't allow shorthand column labels -- it requires the 'AS' operand. SELECT col1 foo, ...; -> ERROR: syntax error at or near "foo" For compatibility with other databases, what objections might be argued in allowing this syntax in the future? On the 'pros' s

  1   2   >