Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[SQL] Alternative Serial

0 views
Skip to first unread message

Ezequias Rodrigues da Rocha

unread,
Mar 11, 2007, 10:28:44 AM3/11/07
to
------=_Part_10651_29125263.1173622833086
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi list,

I know that serials must be created like this.

Create the Serial

Create a field table and reffers to the pre-created serial.

Now I noticed that it is possible to use the default value. I am almost
quite sure that this is an alternative way and non polite.

I would like to know if I am correct and what does it means:

nextval('mySerial_id'::regclass)

What is regclass ?

Regards ,
--
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blogspot.com/
use Mozilla Firefox:http://br.mozdev.org/firefox/

------=_Part_10651_29125263.1173622833086
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi list,<br><br>I know that serials must be created like this.<br><br>Create the Serial<br><br>Create a field table and reffers to the pre-created serial.<br><br>Now I noticed that it is possible to use the default value. I am almost quite sure that this is an alternative way and non polite.
<br><br>I would like to know if I am correct and what does it means:<br><br>nextval(&#39;mySerial_id&#39;::regclass)<br clear="all"><br>What is regclass ?<br><br>Regards ,<br>-- <br>Ezequias Rodrigues da Rocha<br><a href="http://ezequiasrocha.blogspot.com/">
http://ezequiasrocha.blogspot.com/</a><br>use Mozilla Firefox:<a href="http://br.mozdev.org/firefox/">http://br.mozdev.org/firefox/</a>

------=_Part_10651_29125263.1173622833086--

A. Kretschmer

unread,
Mar 11, 2007, 1:02:13 PM3/11/07
to
am Sun, dem 11.03.2007, um 11:20:33 -0300 mailte Ezequias Rodrigues da Rocha folgendes:

> nextval('mySerial_id'::regclass)
>
> What is regclass ?

An Object Identifier for relation names.

See http://www.postgresql.org/docs/8.1/interactive/datatype-oid.html


Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

0 new messages