> I understand that ObjID of LOCKtag recognizes each individual row locked
by
a row level lock. BUt i have noticed that if i lock 2 different rows of the
same table they have the same blkno. is this deduction ok?
If they happen to be stored in the same block, they'd have the same blkno
...
then
> I understand that ObjID of LOCKtag recognizes each individual row locked
by
a row level lock. BUt i have noticed that if i lock 2 different rows of the
same table they have the same blkno. is this deduction ok?
If they happen to be stored in the same block, they'd have the same blkno
...
then
Your solution works in this example, but when
I take a columnname which type is char(30)
I beome the following error:
ERROR: Cannot cast type character to integer
-Ursprüngliche Nachricht-
Von: Pavel Stehule [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 3. September 2003 15:56
An: Amin
"Nigel J. Andrews" <[EMAIL PROTECTED]> writes:
> On Wed, 3 Sep 2003 [EMAIL PROTECTED] wrote:
>> I don't know of a way of querying $libdir directly, but you can find
>> out its value using
>> pg_config --libdir
> LOL, can you say dimwit? I completely forgot about that even though I knew it
> did t
Varun Kacholia <[EMAIL PROTECTED]> writes:
> I wanted to know whether recursive selects are supported in the latest version
> of postgres.
No. Some folks at Red Hat worked on it, but didn't finish in time for
7.4. It might show up in 7.5.
regards, tom lane
--
Look at the "trim" function.
While you are about it, looking over the other
available functions would be worth your while too
(look under "Functions and Operators" in the docs).
--- Amin Schoeib <[EMAIL PROTECTED]> wrote:
>
> Hi,
> Is there an equivalent for the trunc function of
> Oracle in Post
> "Richard" == Richard Huxton <[EMAIL PROTECTED]> writes:
Richard> Hmm - so you can't "su - postgres" because as "admin"
Richard> you'll need a password. Off the top of my head you
Richard> could:
One possibility given ssh access to the machine, from admin :-
ssh [EMAIL PROTEC
> "SD" == Shridhar Daithankar <[EMAIL PROTECTED]> writes:
SD> On 3 Sep 2003 at 14:30, Bruno BAGUETTE wrote:
>> The problem is that this MySQL database uses ENUM, do you see what can I
>> do to migrate ENUM into PostgreSQL ?
SD> varchar with check constraints. Add constraits to allow only
SD>
First of all I want to thank you for your quick response.
That would be very nice if it is possible.
But using to_char I can only set the format or is it in Postgres
Other?
When I would execute this:
select to_char(now(),'DD.Month,')
I would get the monthname in english but how can I perform w
Is there maybe any other???
-Ursprüngliche Nachricht-
Von: Karel Zak [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 3. September 2003 16:53
An: Tom Lane
Cc: Amin Schoeib; [EMAIL PROTECTED]
Betreff: Re: AW: AW: [GENERAL] Localization (for dates) Oracle vs. Postgresql
On Wed, Sep 03, 2003
--- Amin Schoeib <[EMAIL PROTECTED]> wrote:
> Hi,
> Like I see there is no equivalent to the Oracle
> decode Function
> In Postgres.Is there maybe somebody who wrote decode
> as a
> Function?
The problem for any such body is that there is no one
function possible in PostgreSQL that will cover all
On Wed, Sep 03, 2003 at 01:05:30PM +0200, Malcolm Warren wrote:
> I agree with you about database design and in fact fortunately I don't use
> oids as foreign keys, which I thought unwise. However I have found oids very
> useful as temporary unique references to a record in my programming. If I
"Amin Schoeib" <[EMAIL PROTECTED]> writes:
> When I would execute this:
> select to_char(now(),'DD.Month,')
> I would get the monthname in english but how can I perform with to_char
> That I become the monthname in german??
Karel, isn't there a way to get localized month names using to_char()
> "SD" == Shridhar Daithankar <[EMAIL PROTECTED]> writes:
>> Reindexing a table takes an exclusive table lock. If I did it inside
>> a transaction, wouldn't it still take that lock and block out all
>> other access?
SD> Well, you donm't need to reindex as such. You can create a new index fro
On Wed, 3 Sep 2003, Chris Boget wrote:
> > You can try
> > select CAST(cast('4' as NUMERIC(20)) AS varchar);
>
> noobie question:
>
> Do multiple casts like that slow down the query (in general and not specifically
> for the query above)? If not, what about if the query
"Amin Schoeib" <[EMAIL PROTECTED]> writes:
> Is there an equivalent for the trunc function of Oracle in Postgres???
> I need to trunc(the zeros) a number which is stored as a char with a lot of=
> zeros
> Like that : 004
> In oracle you can make that by trunc(YOUR_COLUM
> "TL" == Tom Lane <[EMAIL PROTECTED]> writes:
TL> I don't believe Bruce has yet made any effort to update the SGML
TL> release-notes file for 7.4. Instead look at the CVS-tip HISTORY file:
Definitely not since the 7.4b2 INSTALL docs refer to it being version
7.3.
--
=-=-=-=-=-=-=-=-=-=-=
that's how I'd do it, since in reality, that's all an ENUM is, is a mini
foreign table internalized onto a column in another table.
Vivek Khera wrote:
"SD" == Shridhar Daithankar <[EMAIL PROTECTED]> writes:
SD> On 3 Sep 2003 at 14:30, Bruno BAGUETTE wrote:
The problem is that thi
Why is that, anyway, and why should it be?
Oliver Elphick wrote:
On Wed, 2003-09-03 at 12:19, Martijn van Oosterhout wrote:
If I were doing it would extract the primary key of each table on startup
and then change that one line of code to:
os << "SELECT * FROM " << sTable << " WHERE "
<< pr
The elimination is in concert with the dying of popularity in 'Object
Oriented Databases', right?
Shridhar Daithankar wrote:
On 3 Sep 2003 at 10:27, Malcolm Warren wrote:
To sum up: The Debian migration gzip file declares that oids are not
guaranteed to be unique, issues dire warnings about
"Amin Schoeib" <[EMAIL PROTECTED]> writes:
> Is there maybe any other???
The only other suggestion I can make is to write your own formatting
function. It'd be a pain in the neck to build a general-purpose one,
but you could handle a fixed output format with just a few lines of code
in plpgsql.
Dennis Gearon <[EMAIL PROTECTED]> writes:
> Oliver Elphick wrote:
>
> >You cannot use currval() until you have used nextval() on the same
> >sequence in the same session.
> Why is that, anyway, and why should it be?
Because that's what currval() does. It doesn't have anything to do
with sequen
"Joshua L. San Juan" <[EMAIL PROTECTED]> writes:
> but in the second table - the sequence was incorrect:
> SELECT pg_catalog.setval ('table2_id_seq', 1, true);
It seems fairly hard to believe that what pg_dump emitted was not the
actual state of the sequence object. Why do you think this is incor
I have been trying to find out more about the postmaster crashing, but
things seem to be getting stranger! I am experiencing problems running
postmaster in gdb too (see end of message)
I will put all the information in this posting for completness,
apologies for the duplicated sections.
I am r
On Wed, 2003-09-03 at 16:13, Tom Lane wrote:
> The reason OIDs shouldn't be considered unique is that there is no
> mechanism to enforce that they are unique --- unless you make one,
> that is, create a unique index on OID for a table. The system does
> not do that for you since it would be exces
On Wed, Sep 03, 2003 at 08:46:42 -0700,
Dennis Gearon <[EMAIL PROTECTED]> wrote:
> Why is that, anyway, and why should it be?
Because it reduces contention by giving each backend its own pool
of sequence values. But until you call nextval a backend won't
have any values reserved.
--
At 09:41 PM 9/2/03 -0400, Matthew T. O'Connor wrote:
On Tue, 2003-09-02 at 20:40, Adam Kavan wrote:
> And there is the problem, all of the counts stay at 0 no matter what I do.
OK, so why is this happening... a bug in the stats system? Ignoring
pg_autovaccu, what numbers do you get from the stats
Bo Lorentsen <[EMAIL PROTECTED]> writes:
> > If I were doing it would extract the primary key of each table on startup
> > and then change that one line of code to:
> >
> > os << "SELECT * FROM " << sTable << " WHERE "
> ><< prikey << " = currval('" << sTable << "_" << prikey << "_seq')";
>
Hi list,
Is there a way to access an especific element of the array NEW in an TCL
trigger, I have a loop that goes for each field (thanks Ian & Darren)
like this:
foreach id [array names NEW] {
then I can refer to an element with this (inside the loop):
$NEW($id)
I do need to make a referen
On Wed, 2003-09-03 at 09:50, Vivek Khera wrote:
> > "SD" == Shridhar Daithankar <[EMAIL PROTECTED]> writes:
>
> SD> On 3 Sep 2003 at 14:30, Bruno BAGUETTE wrote:
> >> The problem is that this MySQL database uses ENUM, do you see what can I
> >> do to migrate ENUM into PostgreSQL ?
>
> SD> var
On Wednesday 03 September 2003 17:24, Bo Lorentsen wrote:
> On Wed, 2003-09-03 at 16:13, Tom Lane wrote:
> > The reason OIDs shouldn't be considered unique is that there is no
> > mechanism to enforce that they are unique --- unless you make one,
> > that is, create a unique index on OID for a tabl
I have created a web page describing my presentations:
http://candle.pha.pa.us/main/writings/selecting.html
This should help people who want me to speak to their group but have
trouble deciding on the proper talk. There is also a link to this from
my home page under Writings/Computer.
R
see http://techdocs.postgresql.org/hosting.php
On Tue, 3 Sep 2003, Aaron wrote:
> Hi,
> Can anyone out there point me to an inexpensive web hosting solution
> that offers postgres database support???
> Thanks
> Aaron
>
>
> ---(end of broadcast)---
My date setting is ISO with US conventions, and output from a select
is in the form -mm-dd (2002-01-18, for example.
When I do a select such as
SELECT * FROM table WHERE date BETWEEN '2001-12-28' AND '2002-01-28'
It misses the entry with date '2002-01-28' (which does exist!).
Likewise,
S
You should check out Firebird (firebirdsql.sourceforge.net). I believe
your can set databases to be read-only and when embedding, Firebird is
a single DLL.
Jacob
On Mon, 01 Sep 2003 15:42:32 -0400, Christopher Browne
<[EMAIL PROTECTED]> wrote:
>Martha Stewart called it a Good Thing [EMAIL PROTECT
Hi,
I'm trying to understand why a perfect match index is not being used,
and a sequence scan is done in place:
PostgreSQL 7.3.4 on i686-pc-cygwin, compiled by GCC gcc (GCC) 3.2
20020927 (prerelease)
I've a table with 7M records, and an index on 3 fields:
CREATE TABLE public.base (
nombre va
While updating to 7.3.4 I note with some alarm the following passage in
README.Debian.migration.gz written by Oliver Elphick:
"Some schema designs rely on the use of oids as row identifiers. This is
definitely not recommended, not least because oids are not guaranteed to
exist in all future ver
Hi,
I am having problem using the
crosstab function ( which is under the contrib/tablefunc directory). I have
installed the tablefunc module and also installed the functions into my
DB.
I am using postgresql 7.4 beta
version.
I am issuing the following query,
select *from crosstab('s
I have a customer table that has the field CUSTOMER_ID as the primary key
(cust_pkkey), the table has 102,834 records in it.
The following select statement works fine:
select * from customer order by customer_id;
QUERY PLAN:
Index Scan using cust_pkkey on customer (cost=0.00..5175.17 rows=10283
Hi to all ...
I'm looking to a way to auto update some fields of a row when other
fileds are updated.
the table structure are simple,
CREATE TABLE param (
id int4 PRIMARY KEY,
val int4,
ts timestam(3) DEFAULT CURRENT_TIMESTAMP
);
so when a new entry are insert ts areautomatically update,
but
Sorry...
I'm running PostgreSQL under Win32
I've forget to upgrade my cygwin
after do that, it's ok!
Sepho
"Doug McNaught" <[EMAIL PROTECTED]> writes
news:[EMAIL PROTECTED]
> "Sephiroth" <[EMAIL PROTECTED]> writes:
>
> > After install PostgreSQL 7.3.4, I got a 7.3.3 version no?
>
> I compiled 7.3
Hi,
I'm looking for a database
that will support Mac 8.6 onwards. Do you have any
suggestions.
Your input/advice on this
will be appreciated,
satish
[EMAIL PROTECTED] (Ron Johnson) wrote:
> That "_by whatever means_" seems to include "network link", and that
> doesn't sound right.
Ah, but in order to use it over the network link you need to be
running their server software, on the one side, and their client
access software, on the other. Both
Is there an XA Resource Manager for PostgreSQL (perhaps with an interface exposed
using CORBA/IDL) ?
If not, would you know what would prevent one from being written ?
Thanks!
--
__
Sign-up for your own personalized E-mail at Mail.com
Perhaps:
SELECT SETVAL('resrc_serial', MAX(resource_id)) FROM ia_resources;
the sequencethe column the table
This sets the sequence to the highest number after I have used "copy" to load a table;
other values instead of MAX() could be used (e.g. 123456, etc.).
HTH
Hi Darren,
[EMAIL PROTECTED] wrote:
From what i am seeing / thinking did you drop it from the table ???
I am assuming yes and therefore you should recreate the function and the
trigger and you should be fine.
Using 7.3.x use the CREATE OR REPLACE FUNCTION to replace the function so
it will sti
CREATE TABLE public.base (
nombre varchar(255),
calle varchar(255),
puerta int2,
resto varchar(255),
lid int2,
area varchar(4),
telefono varchar(10)
)
CREATE INDEX base_dir ON base USING btree (lid, calle, puerta);
And trying the following select:
select * from base where lid = 457
On Wed, 2003-09-03 at 22:12, Jonathan Bartlett wrote:
> Are you sure this works after you hit the 4 billion mark?
As long as the returened oid is unique on the table in current session !
/BL
---(end of broadcast)---
TIP 4: Don't 'kill -9' the post
Jonathan Bartlett <[EMAIL PROTECTED]> writes:
>>> If you want a globally unique ID based on OIDs, use the table OID
>>> concatenated with the row OID.
>> Ok, this make sense !
> Are you sure this works after you hit the 4 billion mark?
If you have a unique index on OID on each table for which yo
Hi Ian,
Ian Harding wrote:
Is the column you deleted one that you referred explicitly by name in
your function?
No, the column I deleted does not get refered explicitly in the function.
What version are you using?
7.3.3, and I'm planning to upgrade to 7.3.4 later today maybe that can help.
Th
Bruce Momjian wrote:
> Why would you want an abolute value of a negative interval?
Because I'm trying to match pairs of records that satisfy certain criteria,
one of which is that both records have a timestamp that *may* be slightly
offset between them, so I substract the two and the result must b
Claudio Lapidus wrote:
> Hello
>
> Evidently is possible to have a negative time interval:
>
> clapidus=> select interval '-1';
> interval
> ---
> -01:00:00
>
> However, there seems to be no provision to get the absolute value in such
> case:
>
> clapidus=> select @ interval '-1';
> E
>From what i am seeing / thinking did you drop it from the table ???
I am assuming yes and therefore you should recreate the function and the
trigger and you should be fine.
Using 7.3.x use the CREATE OR REPLACE FUNCTION to replace the function so
it will still have the same OID.
Next drop the
Quoting Sander Smeenk ([EMAIL PROTECTED]):
> > Postgres already has a -P option to disable system indexes. Would it be
> > feasable to have a safe mode so that if your locale is broken it sets that
> > flag and also sets enable_indexscan to false. This would at least give you
> > enough to pg_dump
> -Original Message-
> From: Christopher Browne [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 01, 2003 12:43 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [GENERAL] delivering database stand-alone
>
>
> Martha Stewart called it a Good Thing
> [EMAIL PROTECTED] (Joost Kremers)wrote:
>
Oki, thx... Any ideas to what is sensible values also?
(Like number of maxIdle compared to maxActive, etc..)
BTJ
On Wed, 2003-09-03 at 15:34, Paul Thomas wrote:
> On 02/09/2003 23:06 Bjørn T Johansen wrote:
> > I am running a connection pool for the PostgreSQL and I was wondering
> > which value
Hi Donald,
Donald Formiga Leite Junior wrote:
Hi. Sorry about my English. I´m finishing my studies in the University and my final project is about PostgreSQL. I want to know if is it possible to send some materials, manual, documentation about this Database. Thank You. I wait for reply.
Have you
On Wed, 2003-09-03 at 13:49, Ron wrote:
> see below
>
> Greg Stark wrote:
>
> >So I have a query in which some of the select values are subqueries. The
> >subqueries are aggregates so I don't want to turn this into a join, it would
> >become too complex and postgres would have trouble optimiz
Shridhar Daithankar wrote:
> On 2 Sep 2003 at 15:08, Amin Schoeib wrote:
> > I would like to know if there is a Function in Postgres
> > Like the LAST_DAY Function in Oracle??
> > In Oracle you can use the function the get the last day of a month.
>
> While this is not a direct answer to questio
"Satish Kumar" <[EMAIL PROTECTED]> writes:
> I'm looking for a database that will support Mac 8.6 onwards. Do you have any
> suggestions.
PostgreSQL runs fine on OS X, but doesn't and won't run on "Classic"
Mac OS.
-Doug
---(end of broadcast)---
John Harrold wrote:
-- Start of PGP signed section.
> i've run into the situation where i need to set the last_value of a
> sequence. can someone tell me how this is done?
setval()?
--
Bruce Momjian| http://candle.pha.pa.us
[EMAIL PROTECTED] | (610) 3
Peter Eisentraut wrote:
Andreas Fromm writes:
I was thinking of defining a view "users" over "persons" which would let
me retrive the list of useres. But How would I implement the rule for
insertiung users? I tryed the following but NEW is not known where I
want to use it:
CREATE VIEW users AS
"Bupp Phillips" <[EMAIL PROTECTED]> writes:
> but...
>
> select * from customer order by customer_id, first_name;
> QUERY PLAN:
> Sort(cost=142028.25..142028.25 rows=102834 width=724)
> -> Seq Scan on customer (cost=0.00..4617.34 rows=102834 width=724)
> Total runtime: 1.81 msec
Actually i
I have made Debian packages of PostgreSQL 7.4beta2 and uploaded them to
Debian's experimental archive.
The package version is 7.3.99.7.4beta2-1 (so that when 7.4's final
version comes out, it will be perceived as a later package). They are
built on a machine running current unstable, so they cann
the offnum of LOCKTAG I gather indicates which row (tuple) is being locked
in a row level locking. But when I lock 2 diffrent rows of a table, offset
for both is 0. and also offset is 0 if i take a table lock on the same
table. (blkno is the same for all three locks)..shouldnt the OffsetNumber
> No it don't know anything about the table it insert into. I simply do
> the following :
>
> 1. INSERT data (comming from another layer)
> 2. Get the last oid
> 3. SELECT * FROM the same table where oid = what I just found.
>
> I know absolutly nothing about the table, and I like it this way :-)
On 3 Sep 2003 at 11:28, Bo Lorentsen wrote:
> On Wed, 2003-09-03 at 11:10, Shridhar Daithankar wrote:
>
> > Yes. It is correct. As of 7.3.x and onwards oids are optional at table creation
> > times. They default to be available for new objects but that is for backwards
> > compatibility I belie
On Wed, 2003-09-03 at 11:38, Shridhar Daithankar wrote:
> Well, what I do is, declare a serate sequence, retrive next available value and
> explicitly insert it into a integer field. That avoids having to retrieve the
> latest value again.
Yeps, this is what I call an application specific implim
On Wed, Sep 03, 2003 at 12:20:42PM +0200, Bo Lorentsen wrote:
> On Wed, 2003-09-03 at 11:38, Shridhar Daithankar wrote:
>
> > Well, what I do is, declare a serate sequence, retrive next available value and
> > explicitly insert it into a integer field. That avoids having to retrieve the
> > late
On Wed, 2003-09-03 at 13:19, Martijn van Oosterhout wrote:
> But your insert function needs to know something about the table it's
> inserting into. The sequences have quite predicatable names. Besides, you
> can set the name yourself (DCL does this IIRC).
No it don't know anything about the table
> That said, there is no reason why someone couldn't create a last_sequence()
> function so you could say SELECT currval( last_sequence() ). Ofcourse, if
> your table has no SERIAL field, you're stuffed either way.
Instead of SELECT currval( last_sequence() ), what about implementing
oracl type b
On Wed, Sep 03, 2003 at 01:47:01PM +0200, Bo Lorentsen wrote:
> On Wed, 2003-09-03 at 13:19, Martijn van Oosterhout wrote:
> > The only thing you need to know is the name of the primary key field. This
> > many be a problem in a generic layer. If you like you can make a UNIQUE
> > INDEX on the oid
On Wed, 2003-09-03 at 17:28, Martijn van Oosterhout wrote:
> If you know the OID of a row, PostgreSQL doesn't have a special lookup table
> to find it. That's also why they're not unique; the backend would have to
> scan through every table to find out if the next one is available.
Ahh, thats not
73 matches
Mail list logo