Michael Chaney wrote:
On Thu, Mar 04, 2004 at 10:50:50AM -0500, Tom Lane wrote:
If I understood the requirements correctly, it might be sufficient to
put a unique index on (id1,id2). If two transactions simultaneously try
to insert for the same id1, one would get a duplicate-index-entry
failure,
On Thu, Mar 04, 2004 at 10:50:50AM -0500, Tom Lane wrote:
> If I understood the requirements correctly, it might be sufficient to
> put a unique index on (id1,id2). If two transactions simultaneously try
> to insert for the same id1, one would get a duplicate-index-entry
> failure, and it would ha
Michael Chaney <[EMAIL PROTECTED]> writes:
> begin;
> lock table test in exclusive mode;
> insert into test values (1,(select max(id2) from test where id1=1)+1);
> commit;
> It's not pretty, and it'll probably slow down as the table grows.
As-is, that will definitely get pretty slow on large tabl
On Wed, Mar 03, 2004 at 06:45:56AM +0100, Paulovi?? Michal wrote:
> Yes I know,
>
> But how you do this at PgSQL
You have to lock the table exclusively, get the max value for your
particular "id1", increment it, insert the row, and commit:
begin;
lock table test in exclusive mode;
insert int
Bruno Wolff III wrote:
On Wed, Mar 03, 2004 at 18:12:18 +0100,
Paulovi?? Michal <[EMAIL PROTECTED]> wrote:
You don't build secent level unique
You have to create uniqe index under both levels (first and second)
together. But in MySQL there is no problem.
I alredy have table with mulitlevel au
On Wed, 3 Mar 2004, [UTF-8] Paulovič Michal wrote:
> Yes I know,
>
> But how you do this at PgSQL
OK, I just read the response where someone showed me how to make such a
table in mysql. What an odd, and non-intuitive behaviour that is.
Anyway, first off, upgrade your version of postgresql
On Wed, Mar 03, 2004 at 18:12:18 +0100,
Paulovi?? Michal <[EMAIL PROTECTED]> wrote:
> You don't build secent level unique
> You have to create uniqe index under both levels (first and second)
> together. But in MySQL there is no problem.
> I alredy have table with mulitlevel autoincrement (in My
Harald Fuchs wrote:
In article <[EMAIL PROTECTED]>,
"scott.marlowe" <[EMAIL PROTECTED]> writes:
On Tue, 2 Mar 2004, [UTF-8] PauloviÃÂ Michal wrote:
how you solve the problem with multilevel autoicrement?
In MySQL you create table with col1, col2. Col 2 is AUTOICRE
how you solve the problem with multilevel autoicrement?
In MySQL you create table with col1, col2. Col 2 is AUTOICREMENT and you
have to create UNIQUE INDEX (Col1, Col2). If you insert to this table
for col1 volume 1, col2 automaticaly increase by one.
Example:
Insert into table values (1);
Ins
Michael Chaney wrote:
> One other note, for those converting a database from MySQL to
> PostgreSQL, I have a table creation conversion script here:
>
> http://www.michaelchaney.com/downloads/m2p.pl
>
> I know that two come with PostgreSQL in the contrib directory, but I
> wrote this because those
On Mon, Mar 01, 2004 at 11:09:32 -0600,
Shawn Harrison <[EMAIL PROTECTED]> wrote:
>
> Would it be worthwhile to move many of these \d queries into the system
> schema, as views on various system tables? I've thought that it would be
> very useful to be able to access these things through the web
"Karam Chand" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> 5.) In MySQL, there are many command like show tables,
> show databases etc. to get object details. I cant see
> anything similar in PGSQL. After searching the net i
> find that i have to execute certain queries to fetch
In PGAdmin III -- you might want to UNCHECK the "Display system objects"
option under the "Display" menu option -- this will prevent you from seeing
all of the non-public schema's and limit your view in PGAdmin to just the
databases you created...
Most people dont really need to dink around with t
13 matches
Mail list logo