If you actually need to know the value of N_GEN in your ASP application,
you will need to query the database first and select the NEXTVAL from
the sequence that the "serial" data type will create, then use that
returned value in your insert - ie, DON'T exclude it from the insert,
otherwise it will
PM
Subject: Re: [SQL] PRIMARY KEY
Hello,
Is it possible to redesign your table as follows:
create table Mod48_00_2007 (
IDtext,
N_GEN serial not null,
FORMSTORE text,
COD_NOTATIO text,
PA_COGNOMEtext,
constraint pk_Mod48_00_2007 primary key
Phillip Smith wrote:
If you actually need to know the value of N_GEN in your ASP
application, you will need to query the database first and select the
NEXTVAL from the sequence that the "serial" data type will create,
then use that returned value in your insert - ie, DON'T exclude it
from the
Hello,
Is it possible to redesign your table as follows:
create table Mod48_00_2007 (
IDtext,
N_GEN serial not null,
FORMSTORE text,
COD_NOTATIO text,
PA_COGNOMEtext,
constraint pk_Mod48_00_2007 primary key (N_GEN)
);
Your insert simply becomes:
INSERT INTO MOD
Shavonne Marietta Wijesinghe wrote:
Hello
I have created a table
CREATE TABLE MOD48_00_2007 ( ID text, N_GEN int PRIMARY KEY, FORMSTORE text,
COD_NOTAIO text, PA_COGNOME text);
And i insert the rows via a form in ASP. When the form loads i have a functin
that goes and gets the value of the fi
Hello
I have created a table
CREATE TABLE MOD48_00_2007 ( ID text, N_GEN int PRIMARY KEY, FORMSTORE text,
COD_NOTAIO text, PA_COGNOME text);
And i insert the rows via a form in ASP. When the form loads i have a functin
that goes and gets the value of the field N_GEN adds 1 to it and shows it to
On Mon, Jul 24, 2006 at 02:12:39PM +0200, Mario Splivalo wrote:
> Now I run the function again:
>
> l_netsms=# select punimessages();
> NOTICE: Ubacili smo za usera 4162.
> NOTICE: Ubacili smo za usera 4161.
> NOTICE: Ubacili smo za usera 4160.
> NOTICE: Ubacili smo za usera 4159.
> NOTICE: U
Mario Splivalo wrote:
Actually it's not violation, but I get no error message on violating
it...
CREATE OR REPLACE FUNCTION punimessages()
RETURNS bool AS
$BODY$
declare
userId users%ROWTYPE;
begin
truncate table mes_del;
^^^
This at the star
Actually it's not violation, but I get no error message on violating
it...
The story is like this. I have few tables from where I extract
messageIds for particular users. Then, last 100 messages for each user I
transfer to spare table, to do something with that. That spare table has
strange behavi
On Wednesday 19 April 2006 19:21, Volkan YAZICI wrote:
> Here's simple query, to list which table's which columns references to a
> specific table. (Hope this is what you asked for.)
>
> SELECT TBL.table_name, COL.column_name
> FROM information_schema.referential_constraints AS REF
> INNE
On Apr 19 02:01, Wiebe Cazemier wrote:
> I'm trying to find which of the tables in pg_catalog contains the amount of
> references to a primary key, but I can't seem to find it.
Here's simple query, to list which table's which columns references to a
specific table. (Hope this is what you asked for
On Wednesday 19 April 2006 17:00, Wiebe Cazemier wrote:
> Never mind. I found another solution.
Whoops. Posted to quickly there. I do still need to know the amount of
references to the primary key.
---(end of broadcast)---
TIP 1: if posting/readin
On Wednesday 19 April 2006 15:33, Wiebe Cazemier wrote:
> Either I'm blind, or this is not what I'm looking for. I need to know the
> amount of references _to_ a primary key. If you have a customer with two
> orders and one invoice, the reference count for the primary key of the
> custormer would
On Wednesday 19 April 2006 15:09, A. Kretschmer wrote:
> Yes,
> http://www.postgresql.org/docs/8.1/interactive/catalog-pg-constraint.html
Either I'm blind, or this is not what I'm looking for. I need to know the
amount of references _to_ a primary key. If you have a customer with two
orders and o
am 19.04.2006, um 14:01:03 +0200 mailte Wiebe Cazemier folgendes:
> Hi,
>
> I'm trying to find which of the tables in pg_catalog contains the amount of
> references to a primary key, but I can't seem to find it. Google queries are
> also less than successful. Is it even stored in the catalog?
Y
Hi,
I'm trying to find which of the tables in pg_catalog contains the amount of
references to a primary key, but I can't seem to find it. Google queries are
also less than successful. Is it even stored in the catalog?
---(end of broadcast)---
TIP
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
On Thu, 2 Sep 2004, Nosyman wrote:
It is necessary to define an index for a primary key column?
Let's have an example
CREATE TABLE users(
id_user INTEGER PRIMARY KEY,
user_name VARCHAR(25)
);
Does PgSQL automatically create an index for id_user (pri
O kyrios Nosyman egrapse stis Sep 2, 2004 :
> It is necessary to define an index for a primary key column?
>
> Let's have an example
> CREATE TABLE users(
> id_user INTEGER PRIMARY KEY,
> user_name VARCHAR(25)
> );
>
> Does PgSQL automatically create an index for id_user (primary key) or it
> mu
It is necessary to define an index for a primary key column?
Let's have an example
CREATE TABLE users(
id_user INTEGER PRIMARY KEY,
user_name VARCHAR(25)
);
Does PgSQL automatically create an index for id_user (primary key) or it
must be created by hand?
Thanks
--- Waheed Rahuman <[EMAIL PROTECTED]> wrote:
> Hi Greetings
> My question is How many primary key i can assign in
> a PostGresql Table
>
> Rowid| Parent1 | Parent2
> | Parent3 | Parent4 |
> Parent5 | Parent6 | Parent7
Hi Greetings
Friends please help me in setting the primary
key
in a table how many primary key i can
create.
In MS access its only 10 column can be made into
primary key !.
My question is How many primary key i can assign in
a PostGresql Table
Rowid
| Parent1
| Par
On Wed, 31 Oct 2001, [ISO-8859-1] Stéphane Chomat wrote:
> Yes, name is an internal type. The problem is in the type of the table
> repertory. If it is not
> possible to use this syntaxe, i will take the type char. I just try the
> new possibility of postgressql.
Yeah. I think the problem is th
Yes, name is an internal type. The problem is in the type of the table repertory. If it is not
possible to use this syntaxe, i will take the type char. I just try the new possibility of postgressql.
thanks.
steph.
Le mercredi 31 octobre 2001, à 11:08 , Stephan Szabo a écrit :
On Wed, 31 Oct 2001
On Wed, 31 Oct 2001, [ISO-8859-1] Stéphane Chomat wrote:
> I create two table repertory and person. And i have an error :
>
> > CREATE TABLE repertory (name_rep name, attribut text[], PRIMARY
> KEY(name_rep));
> > CREATE TABLE person (nam_rep repertory, name_pers text, url text, eadr
> text, te
On Wed, Oct 31, 2001 at 10:06:22AM +0100, St?phane Chomat wrote:
> I create two table repertory and person. And i have an error :
>
> > CREATE TABLE repertory (name_rep name, attribut text[], PRIMARY
> KEY(name_rep));
> > CREATE TABLE person (nam_rep repertory, name_pers text, url text,
> e
I create two table repertory and person. And i have an error :
> CREATE TABLE repertory (name_rep name, attribut text[], PRIMARY KEY(name_rep));
> CREATE TABLE person (nam_rep repertory, name_pers text, url text, eadr text, tel text, attribut text[], PRIMARY KEY(name_pers,nam_rep));
NOTICE: CRE
I think you're just witnessing the optimizer at work. If it thinks that
doing sequential scans is faster, it will ignore the indices.
At 11:03 AM 5/31/2001 +0200, Koen Antonissen wrote:
>Thing I descovered after i posted to the group was that after creating
>the scheme again, the indexes are us
It really depends on the number of rows. If the number of
rows in the tables are small or the number of rows returned is
a reasonable percentage, the index scan is currently more expensive.
What does (for example) select count(*) from classes; give?
On Thu, 31 May 2001, Koen Antonissen wrote:
nalyze) the use
of indexes was gone again on certain tables...
Any other suggestions?
-Original Message-
From: bernd pinter [mailto:[EMAIL PROTECTED]]
Sent: donderdag 31 mei 2001 8:53
To: Koen Antonissen
Subject: Re: [SQL] primary key scans in sequence
the problem is the optimizer.
you u
On Wed, 30 May 2001, Koen Antonissen wrote:
> Now this one doesn't:
> Table "teams"
> Attribute | Type | Modifier
> ---+-+--
> id| integer | not null
Scan on teams (cost=0.00..1.09 rows=1 width=173)
EXPLAIN
I really don't understand the difference between the two, and it didn't
work before i created an extra index on id...
Kind regards,
Koen Antonissen
-Original Message-----
From: Richard Poole [mailto:[EMAIL PROTECTED]]
bernd writes:
> hey i have the following table def (834.000 rows, vaccum analyze'd):
> dl_online=# \d mitglied
> Table "mitglied"
>Attribute| Type | Modifier
> +--+
> mitgliedid | bigint
On Thu, Mar 29, 2001 at 03:47:58PM +0200, bernd wrote:
> hey i have the following table def (834.000 rows, vaccum analyze'd):
> dl_online=# \d mitglied
> Table "mitglied"
>Attribute| Type | Modifier
> +--+--
hey i have the following table def (834.000 rows, vaccum analyze'd):
dl_online=# \d mitglied
Table "mitglied"
Attribute| Type | Modifier
+--+
mitgliedid | bigint | not null
dlnummer
Sorry for lack of proper quoting, you might find it useful to
From: "Sharmad Naik" <[EMAIL PROTECTED]>
I m sorry If anyone has already asked this Q earlier
I wanted to know
Q1. Whether I can have another key on which the table is indexed even though
i have a primary key..Then how would the
I m sorry If anyone has already asked this Q
earlier
I wanted to know
Q1. Whether I can have another key on which the
table is indexed even though i have a primary key..Then how would the data
be accessed according to primary key or the indexed key of my choice or i can
index as per m
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
El 20-Jul-2000 Carolyn Lu Wong escribio:
> create table aaa(
> field1 not null,
> field2 ,
> ,
> primary key (field1, field2)
> );
>
> Based on the above table definition, field2 allows null values. But
> after
>From: Carolyn Lu Wong <[EMAIL PROTECTED]>
>To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>Subject: [SQL] primary key question
>Date: Thu, 20 Jul 2000 17:26:30 +1000
>
>create table aaa(
> field1 not null,
> field2 ,
>
Carolyn Lu Wong wrote:
>
> create table aaa(
> field1 not null,
> field2 ,
> ,
> primary key (field1, field2)
> );
>
> Based on the above table definition, field2 allows null values. But
> after the table created based on the above script, field2 be
create table aaa(
field1 not null,
field2 ,
,
primary key (field1, field2)
);
Based on the above table definition, field2 allows null values. But
after the table created based on the above script, field2 becomes not
null. The only conclusion I come u
40 matches
Mail list logo