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
> 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
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
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
see a possibility
that is closer to Postgres, e.g. in plpgsql?
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
> Can this be done using tcl or perl?
I'll try them and report what I find out.
V.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
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
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
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
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
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
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
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
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
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--
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
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
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
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
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-
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
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:
--
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
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
our DriverManager.getConnection(url,
user, password).
HTH
--
Paul Thomas
+--+-+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants |
http:/
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
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:/
[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
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
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
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.
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://
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
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
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]
se.
Many thanks in advance for you help,
Paul
smime.p7s
Description: S/MIME cryptographic signature
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
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)-
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
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
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
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
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
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
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
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
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
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
with these
tables.
Thanks.
paul
; 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
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
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
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
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
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
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
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
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
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 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
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)---
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
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
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
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
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
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
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)-
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
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
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
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
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)
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
---
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
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
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
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
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
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
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
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
t that, time to consult some manuals.
--
Paul Lambert
Database Administrator
AutoLedgers
---(end of broadcast)---
TIP 6: explain analyze is your friend
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
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
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
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
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
wn that path.
Cheers,
P.
--
Paul Lambert
Database Administrator
AutoLedgers
---(end of broadcast)---
TIP 6: explain analyze is your friend
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
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
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
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
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
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
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
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
'
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 - 100 of 151 matches
Mail list logo