On Wed, 14 May 2008, Gerald Quimpo <[EMAIL PROTECTED]> writes:
> Instead of trying to update the row in place, insert the row again,
> but with the field you need to mangle (in your example, "plate",
> in my example below, "k") already mangled. this only works if
> the field you're mangling is
Vjy wrote:
> I wrote a C function that will connect to oracle and do insert.
>
> then I created a trigger that calls this C function for any
> insets/updates on TABLE A
>
> when there is a insert in table A , the C function is not called at
> all, any reason why ?
You will need to provide more i
On Tue, 13 May 2008 22:51:00 -0400
Tom Lane <[EMAIL PROTECTED]> wrote:
> "Vyacheslav Kalinin" <[EMAIL PROTECTED]> writes:
> > Reading the manual recently I came across this: (
> > http://www.postgresql.org/docs/8.3/interactive/xfunc-volatility.html )
> >> Because of the snapshotting behavior of MV
On Tue, May 13, 2008 at 02:18:47PM -0400,
Vjy <[EMAIL PROTECTED]> wrote
a message of 16 lines which said:
> I wrote a C function that will connect to oracle
Bad idea.
> when there is a insert in table A , the C function is not called at
> all, any reason why ?
Yes, that's because you use Or
On Wednesday 14 May 2008 19:10:18 Volkan YAZICI wrote:
> On Wed, 14 May 2008, Gerald Quimpo <[EMAIL PROTECTED]> writes:
> > Instead of trying to update the row in place, insert the row again,
> > but with the field you need to mangle (in your example, "plate",
> > in my example below, "k") already
On Wed, 14 May 2008, Gerald Quimpo <[EMAIL PROTECTED]> writes:
> Not really :-). I was just looking at the simplest possible thing that could
> work. I've looked at versioned/temporal databases. But you probably
> can't go there since it definitely adds a lot of complexity to your app
> and quer
Iep,
So thanks to your hint I haven't done the re-encoding, I guess it's the
much better. I don't like latin2 anyway, i prefer UTF8 since I thinkis
more standard.
Thanks a lot.
All beings be happy,
·_- manou
Martijn van Oosterhout escribió:
On Tue, May 13, 2008 at 06:05:48PM +0200, J. Ma
Hi Martijn,
Thank you very much for reply. It has worked perfectly.
Have a good life,
All beings be happy
Martijn van Oosterhout escribió:
On Tue, May 13, 2008 at 05:37:27PM +0200, J. Manuel Velasco - UBILIBET wrote:
I have the idea to create the database and the role and then
Hi there,
I would like to get a list of all tables in my schema which begin with
"in_". But as the "underscore (_) in pattern stands for (matches) any
single character", my query:
SELECT * FROM pg_tables WHERE schemaname='public' AND tablename LIKE
'in_%' ORDER BY tablename ASC
doesn't
Hi Stef,the underscore has to be escaped:SELECT * FROM pg_tables WHERE schemaname='public' AND tablename LIKE 'in\\_%' ORDER BY tablename ASCExcerpt from Manual:To match a literal underscore or percent sign without matching other characters, the respective characterin pattern must be preceded by
It surely rocks. We switched from MySql to PostgreSQL about a year ago
and have never looked back, we are happy as Larry. A bit more
information on our web site.
http://www.alerce.com.au
Regards,
Mario
Joshua D. Drake wrote:
Scott Marlowe wrote:
On Tue, May 13, 2008 at 9:42 AM, Merlin
Hi all,
let's assume I want to select cities by name fragment:
select * from dem.urb where name ilike 'Lei%';
Then, let's assume I know the zip code and want to use that
for limiting the range of cities returned:
select * from dem.urb where
name ilike 'Lei%' and
2008/5/14 Karsten Hilbert <[EMAIL PROTECTED]>:
> Hi all,
>
> let's assume I want to select cities by name fragment:
>
>select * from dem.urb where name ilike 'Lei%';
>
> Then, let's assume I know the zip code and want to use that
> for limiting the range of cities returned:
>
>sele
On May 14, 2008, at 8:15 AM, Karsten Hilbert wrote:
Effectively I want known-zip cities first, then
fragment-matching cities but without those already in the
known-zip list.
Can anyone teach me how I need to do this in SQL ?
I think you've made things far more complicated than you need. How
On Wed, May 14, 2008 at 09:48:20PM +0800, mian wang wrote:
> select * from (
>select *, 1 as rank from dem.urb where
>name ilike 'Lei%' and
>zip = '04317'
>union -- avoid distinctness at this level
>
On Wed, May 14, 2008 at 08:43:31AM -0500, David McNett wrote:
>> Effectively I want known-zip cities first, then
>> fragment-matching cities but without those already in the
>> known-zip list.
>
> I think you've made things far more complicated than you need.
Very likely, yes.
> How about an appr
On May 14, 2008, at 9:07 AM, Karsten Hilbert wrote:
That doesn't work, unfortunately, because the urb (cities)
table doesn't have the zip code. That's stored in a street
table which foreign keys into the urb table. The
dem.v_zip2data view aggregates streets, cities, states and
countries for which
On May 14, 2008, at 9:07 AM, Karsten Hilbert wrote:
That doesn't work, unfortunately, because the urb (cities)
table doesn't have the zip code. That's stored in a street
table which foreign keys into the urb table.
SELECT name, zip, zip='04317' AS zipmatch
FROM urb LEFT JOIN streets ON (s
On Tue, May 13, 2008 at 02:36:18PM -0400, Justin wrote:
> Double holds 15 places which is the highest value of precision it can
> maintain before rounding occurs.
>
> Is is limit less no, but what is?
>
> Practically speaking taking a vale 0.000,000,000,000,001 aka
> 1 trillionth of anything,
On Wed, May 14, 2008 at 09:35:10AM -0500, Decibel! wrote:
> Someone should probably teach the gnumed folks about schemas, too... ;)
Why ? We use several:
dem - demographics stuff
clin - clinical stuff
gm - gnumed internal stuff
i18n - i18n-related stuff
au
On Wed, May 14, 2008 at 09:28:50AM -0500, David McNett wrote:
> I think perhaps you have misunderstood what I was suggesting.
Very well possible.
> If the
> SQL in your original post works, then my suggestion will also work.
Indeed, my initial post had a typo. Here is the last (most complex) qu
On May 12, 2008, at 10:42 PM, Craig Ringer wrote:
Personally I'd be tempted to use a `double precision' (float8) for
things like materials consumption.
Or you could just use an un-bounded numeric...
--
Decibel!, aka Jim C. Nasby, Database Architect [EMAIL PROTECTED]
Give your computer some br
On Wed, May 14, 2008 at 09:35:10AM -0500, Decibel! wrote:
> SELECT name, zip, zip='04317' AS zipmatch
> FROM urb LEFT JOIN streets ON (streets.urb_id = urb.urb_id )
> ORDER BY zipmatch DESC, name
> ;
The view dem.v_zip2data (which I erronously left out in my
first post) does just that - i
On May 13, 2008, at 1:36 PM, Justin wrote:
Is is limit less no, but what is?
numeric is limitless, unless you specifically bound it. Or you run
out of space...
--
Decibel!, aka Jim C. Nasby, Database Architect [EMAIL PROTECTED]
Give your computer some brain candy! www.distributed.net Team
On Wed, May 14, 2008 at 09:35:10AM -0500, Decibel! wrote:
> Someone should probably teach the gnumed folks about schemas, too... ;)
Instead of Why? I should have said And what? I am, of
course, open to insights on that.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD
On Wed, 14 May 2008, Karsten Hilbert wrote:
> Modifying to:
>
> select * from (
>
> select distinct on (name) * from (
>
> select *, 1 as rank from dem.urb where
> name ilike 'Lei%' and
> zip = '0
Hello.
I think I need som help on this function I write in plpgsql
I want to return
CREATE OR REPLACE FUNCTION gList(tid_ TIMESTAMP) RETURNS AS $$
DECLARE
rec RECORD;
BEGIN
FOR rec IN SELECT DISTINCT custid,action,nr FROM ...
IF rec.action = ...
END I
On May 14, 2008, at 9:55 AM, Karsten Hilbert wrote:
On Wed, May 14, 2008 at 09:35:10AM -0500, Decibel! wrote:
SELECT name, zip, zip='04317' AS zipmatch
FROM urb LEFT JOIN streets ON (streets.urb_id = urb.urb_id )
ORDER BY zipmatch DESC, name
;
The view dem.v_zip2data (which I erronously
On Tuesday 13 May 2008 18:43:25 Tom Lane wrote:
> "Scott Marlowe" <[EMAIL PROTECTED]> writes:
> > On Tue, May 13, 2008 at 3:43 PM, Nathan Thatcher <[EMAIL PROTECTED]>
wrote:
> >> I am in the middle of switching a bunch of queries over from MySQL to
> >> PostgreSQL and have hit a little snag. The f
On Wed, May 14, 2008 at 08:21:00AM -0700, Stephan Szabo wrote:
> Can't you just do something like order by name, rank as part of the
> distinct on subselect to force it to pick the rank 1 row for a given name?
>
> So, basically
> select * from
> ( select distinct on ... order by name, rank )
> o
>
>You don't need to re-index the indexes, you need to vacuum the tables.
>
>http://www.postgresql.org/docs/current/static/sql-vacuum.html
>
My first idea was to throw away table BALANCE and work without it.
I even created a PL/SQL function for real-time calculation of article
balances.
But
I have forgotten how much i hate C++
Its not doing what you say it would but it did do other odd ball
things. I miss my foxpro :-(.
Plus its not holding 15 precision points
#include
#include
int main()
{
double a = 0.1;
//double b = 1000;
double c = 1;
On Apr 22, 2008, at 12:04 PM, Vanole, Mike wrote:
It seems that running vacuum still has value in the above approach
because I still see index row versions were removed.
That means either part of the import failed (transaction aborted), or
you're updating or deleting rows between the load an
Robert Treat <[EMAIL PROTECTED]> writes:
> ... but I have to wonder, if we have established f1 by the time
> we evaluate the group by, shouldn't we also be able to determine f1 at having
> time, and therefore allow alias in having in this instance?
The key point is that we only allow output-li
Hello,
I wish some could help me on this.
I got a table which has 100500 records, when I try to query this particular
record
select * from cs_sr_mthly_rtn where mthly_rtn_id = 61609;
Postgres crash, and show this errors:
server closed the connection unexpectedly
This probably means the server te
On May 5, 2008, at 2:43 AM, [EMAIL PROTECTED] wrote:
We are using Postgres in our company successfully since 2001 but now
we arrived at the conclusion that we really need "Materialized Views"
for our further business. Also we decided that we should try to pay
someone from the community for the fe
On Wed, May 14, 2008 at 11:47:52AM -0400, Justin wrote:
> I have forgotten how much i hate C++
What we're talking about doesn't have much to do with C++, it's floating
point maths in general.
> Its not doing what you say it would but it did do other odd ball
> things. I miss my foxpro :-(.
Wh
Looks loke you tried to run your query whilst postgres was recovering from an
improper shutdown, try once again when the last thing in the log is
LOG: database system is ready
- Original Message
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: Postgres
Sent: Wednesday, 14 May, 2008
Hello
Delete this broken row
Regards
Pavel Stehule
2008/5/14 <[EMAIL PROTECTED]>:
> Hello,
>
> I wish some could help me on this.
>
> I got a table which has 100500 records, when I try to query this particular
> record
>
> select * from cs_sr_mthly_rtn where mthly_rtn_id = 61609;
> Postgres cra
No, I didn't run the query when the DB is in recovering.
I did that after database system is ready
- Original Message
From: Glyn Astill <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; Postgres
Sent: Wednesday, May 14, 2008 6:07:23 PM
Subject: Re: [GENERAL] postgres crash when select a reco
In addition to what Pavel said, perhaps this will help
http://archives.postgresql.org/pgsql-admin/2005-03/msg00448.php
- Original Message
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: Glyn Astill <[EMAIL PROTECTED]>; Postgres
Sent: Wednesday, 14 May, 2008 6:20:10 PM
Subject: Re: [G
Sam Mason wrote:
On Wed, May 14, 2008 at 11:47:52AM -0400, Justin wrote:
I have forgotten how much i hate C++
What we're talking about doesn't have much to do with C++, it's floating
point maths in general.
Its not doing what you say it would but it did do other odd ball
things.
Hello,
Yes, I deleted that record, and now my backup is working fine! Thanks
But why this problem came out? Is there anyway to trace it down and how it
happen? Or is it a bug of postgres?
Regards
Louis
- Original Message
From: Pavel Stehule <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc:
The statement:
revoke all on view internal.all_objects from public;
yields a syntax error. The docs show that the word "view" is not
acceptable in this statement which is fine but the surprising thing is
that:
revoke all on table internal.all_objects from public;
works fine even though al
On Wed, May 14, 2008 at 02:08:47PM -0400, Justin wrote:
> Sam Mason wrote:
> >What does foxpro use for storing numbers? or is it just that you never
> >pushed it hard enough for the abstractions to show through.
>
> I know i pushed it. Foxpro for the most has only 4 basic data types
> Numeri
I'd like to find a timestamp function that WILL change within a transaction.
This function will return to me a 15 digit BIGINT number in base10:
SELECT FLOOR(EXTRACT(EPOCH FROM NOW()) * 10)::bigint;
The problem is that NOW() does not change within a transaction and so I
keep getting the
On May 14, 2008, at 12:56 PM, D. Dante Lorenso wrote:
I'd like to find a timestamp function that WILL change within a
transaction.
This function will return to me a 15 digit BIGINT number in base10:
SELECT FLOOR(EXTRACT(EPOCH FROM NOW()) * 10)::bigint;
The problem is that NOW() does n
On Wed, May 14, 2008 at 02:08:47PM -0400, Justin wrote:
My problem is we calculate resistance of parts in a Foxpro app
that we
want to move because we want to bring all the custom apps into one
framework and single database.
Take this calculation (0.05/3* 1.0025) which is used to
calcul
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
Le 14 mai 08 à 21:56, D. Dante Lorenso a écrit :
I'd like to find a timestamp function that WILL change within a
transaction.
See the fine manual:
http://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-CU
Sam Mason wrote:
On Wed, May 14, 2008 at 02:08:47PM -0400, Justin wrote:
Sam Mason wrote:
What does foxpro use for storing numbers? or is it just that you never
pushed it hard enough for the abstractions to show through.
I know i pushed it. Foxpro for the most has only 4 bas
Andy Anderson wrote:
On Wed, May 14, 2008 at 02:08:47PM -0400, Justin wrote:
My problem is we calculate resistance of parts in a Foxpro app that we
want to move because we want to bring all the custom apps into one
framework and single database.
Take this calculation (0.05/3* 1.0025) whi
Sam Mason wrote:
If you mean FoxPro, I think this is another case of MS screwing up.
On May 14, 2008, at 4:08 PM, Justin wrote:
Foxpro normally did not suffer form other MS screw ups.
That's because MS bought it from a third-party developer.
(And so, of course, they couldn't allow that to s
On May 13, 2008, at 11:42 AM, Merlin Moncure wrote:
Here are some other things we have v. mysql:
*) Much better shell
I tend to agree based on my limited experience.
However, being a GUI-oriented person I haven't noticed management
tools comparable to phpMyAdmin (for web) and CocoaMySQL
Have you tried Navicat? The light version is free for the Mac (I think).
Andy Anderson wrote:
On May 13, 2008, at 11:42 AM, Merlin Moncure wrote:
Here are some other things we have v. mysql:
*) Much better shell
I tend to agree based on my limited experience.
However, being a GUI-orien
Andy Anderson wrote:
However, being a GUI-oriented person I haven't noticed management tools
comparable to phpMyAdmin (for web) and CocoaMySQL (for Mac). Perhaps
someone can enlighten me?
(Yes, I've tried pgAdmin, but it's not quite ... right. I can't say why
at the moment, I should probably
Andy Anderson wrote:
Sam Mason wrote:
If you mean FoxPro, I think this is another case of MS screwing up.
On May 14, 2008, at 4:08 PM, Justin wrote:
Foxpro normally did not suffer form other MS screw ups.
That's because MS bought it from a third-party developer.
(And so, of course, they co
I am on PG 8.1.10 on RedHat Linux. Some page cache/query performance
questions:
Is there a way to tell whether a query is satisfied from memory cache or
from disk. The only way I know of is based on the time the query takes
(reported by EXPLAIN ANALYZE) -- comparing the first-time performance
(aft
On Wed, 14 May 2008, George Pavlov wrote:
Is there a way to tell whether a query is satisfied from memory cache or
from disk.
No. You can look at the hit rate statistics for the tables and indexes
referenced and see how they change before and after the query, but this
just tells you about w
Please, can someone explain how is it posible for ALTER TABLE to add a
primary key column to a table without some intruction that would make it
a real PK (NOT NULL and UNIQUE).
prueba=> CREATE TABLE nopk (
prueba(> textito varchar
prueba(> );
CREATE TABLE
prueba=> INSERT INTO nopk VALUES ('algo
I'd like to convert very large unsigned numbers (ala bigint) to a text
string using base62. I created this PL/PERL function to do the trick:
CREATE OR REPLACE FUNCTION "public"."ls_crypt_convert_base" (in_value
text, in_base integer) RETURNS text AS
$body$
my ($value, $
Steve Crawford wrote:
> My fingers sometimes run on "autoappend semicolon" mode and I end up
> typing "\pset pager always;" instead of "\pset pager always". No error
> is returned, short (but wide) output is not routed to the pager, and I
> have to back up and correct the \pset pager command. Af
On Wed, May 14, 2008 at 4:35 PM, Martin Marques <[EMAIL PROTECTED]>
wrote:
> Please, can someone explain how is it posible for ALTER TABLE to add a
> primary key column to a table without some intruction that would make it a
> real PK (NOT NULL and UNIQUE).
>
> prueba=> CREATE TABLE nopk (
> prueb
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:pgsql-general-
> [EMAIL PROTECTED] On Behalf Of Martin Marques
> Sent: Wednesday, May 14, 2008 4:35 PM
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] bug on ALTER TABLE
>
> Please, can someone explain how is it posible for AL
> I'd like to convert very large unsigned numbers (ala bigint) to a text
> string using base62. I created this PL/PERL function to do the trick:
base 62 is cruel and unusual punishment. Introduce two more printing
characters to your set a..z, A..Z, 0..9 such as "_" and "!" and do it in base 64
in
"Bruce Momjian" <[EMAIL PROTECTED]> writes:
> Steve Crawford wrote:
>> My fingers sometimes run on "autoappend semicolon" mode and I end up
>> typing "\pset pager always;" instead of "\pset pager always".
FWIW I get bitten by this all the time with \set AUTOCOMMIT.
>> I didn't find this docum
Stuart Cooper wrote:
I'd like to convert very large unsigned numbers (ala bigint) to a text
string using base62. I created this PL/PERL function to do the trick:
base 62 is cruel and unusual punishment. Introduce two more printing
characters to your set a..z, A..Z, 0..9 such as "_" and "!" and
On Wed, 14 May 2008, D. Dante Lorenso wrote:
Stuart Cooper wrote:
base 62 is cruel and unusual punishment. Introduce two more printing
characters to your set a..z, A..Z, 0..9 such as "_" and "!" and do it in
base 64
instead.
I thought about adding 2 more characters, but I didn't like anythi
I have to count up a whole lot of things in a hurry. But in counting
them, I have to do a bit of analysis on each.
Each goober that I'm counting can be considered to have four
characteristics. The first three are binary: it's either male or
female, rich or poor, strong or weak. The last charac
Hello
2008/5/14 <[EMAIL PROTECTED]>:
> Hello,
>
> Yes, I deleted that record, and now my backup is working fine! Thanks
>
> But why this problem came out? Is there anyway to trace it down and how it
> happen? Or is it a bug of postgres?
>
I can't to eliminate PostgreSQL bug, but sometimes this p
69 matches
Mail list logo