[SQL] AUTO INCREMENT

2000-06-10 Thread GANESH KUMAR


i am searching for 
autoincrement in table 

in table employee
i want give empno as autoincrement

is there any syntax
like this
 create table emp
(empno  integer auto_increment);

send reply
ganesh

__
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com



Re: [SQL] AUTO INCREMENT

2000-06-10 Thread M . Mazurek

On Sat, 10 Jun 2000, GANESH KUMAR wrote:
> i am searching for 
> autoincrement in table 
> 
> in table employee
> i want give empno as autoincrement
create table xyz (id serial primary key);
check documentation what it really is:).


Marcin Mazurek

-- 
administrator
MULTINET SA o/Poznan
http://www.multinet.pl/




Re: [SQL] AUTO INCREMENT

2000-06-10 Thread Lucile Dirry

Check manual/user for details on 'sequences'.
Good luck.

-Message d'origine-
De : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
À : GANESH KUMAR <[EMAIL PROTECTED]>
Cc : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date : samedi 10 juin 2000 12:12
Objet : Re: [SQL] AUTO INCREMENT


>On Sat, 10 Jun 2000, GANESH KUMAR wrote:
>> i am searching for
>> autoincrement in table
>>
>> in table employee
>> i want give empno as autoincrement
>create table xyz (id serial primary key);
>check documentation what it really is:).
>
>
>Marcin Mazurek
>
>--
>administrator
>MULTINET SA o/Poznan
>http://www.multinet.pl/
>




[SQL] postmaster: init.d/start

2000-06-10 Thread Markus Wagner

Hi,

under SuSe Linux 6.3 there are different subdirectories rc.d for
different runlevels. Each dir contains links to the start/stop scripts.
The filenames contain numbers to indicate the position / the order of
the services to start.

Where (for which runlevel) and at what position should I link the pg
start/stop script?
Why should one link it for more than one runlevel (I noticed this for
apache)?

Thanks,

Markus




[SQL] BACK UP

2000-06-10 Thread GANESH KUMAR

I WANT TO TAKE BACK UP DAILY WORK DONE

WHAT IS PROCEDURE IS THERE ANY COMMMAND

GANESH

__
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com



Re: [SQL] postmaster: init.d/start

2000-06-10 Thread Daniel Fairs


This is the System V-style initialisation. The layout is as follows:

/etc/rc.d/init.d/
This directory contains the actual scripts which start and stop the
various services on the system. The system supplies a 'start' or 'stop'
parameter for the call of the script depending on whether the system is
starting up (or changing runlevel) or shutting down.

/etc/rc.d/rcX.d
As you say, these correspond to each of the runlevels. Each of these
directories contains symbolic links to the scripts in ../init.d
corresponding to the services to be started or stopped in that runlevel.
Links to services to be started in that runlevel start with S and those to
be stopped (killed) start with K. Then there is a number, so the system
knows what order to start the services in (eg. networking needs to be
brought up before name services can start).

As to which runlevel you should start the postmaster in, well, you'll
probably want to start it in the runlevel(s) corresponding to full
multiuser mode, and multisuer mode with X (if applicable). On my RedHat
system, these are runlevels 3 and 5. I think they're different on a SuSE
system, 2 and 3 from memory. Check your /etc/inittab for details, it'll
tell you which runlevel corresponds to what mode of use.

So, to conclude: you need a script called (for example) postgresql int
your /etc/rc.d/init.d directory. This will start and stop the postmaster,
and should be written to expect 'start' or 'stop' as parameters. Take a
look at (for example) the /etc/rc.d/init.d/apache startup script for a
'template' of how to do this. Obviously you'll need the commands to
start/stop the postmaster rather than apache when building this script ;).

Secondly, you'll have to decide which runlevels you want the postmaster to
start in (probably 2 and 3, I may be wrong). Then create a link in the
rcX.d directories corresponding to those runlevels up to the startup
script for starting the postmaster, and shutting it down when the runlevel
changes. For example:

cd /etc/rc.d/init.d
pico postgresql

cd ../rc3.d
ln -s ../postgresql S60postgresql
ln -s ../postgresql K60postgresql

... and so on for other runlevels. You might want to put a kill link in
the runlevel directory used for system shutdown (6 on my system) so
postmaster gets shut down properly.

As far as at what point you should start the postmaster, you should start
it after the services that it depends on have started, so probably after
networking and maybe named, if you run it. I find that around 60-ish works
well.

Hope this helps,
Dan

On Sat, 10 Jun 2000, Markus Wagner wrote:

> Hi,
> 
> under SuSe Linux 6.3 there are different subdirectories rc.d for
> different runlevels. Each dir contains links to the start/stop scripts.
> The filenames contain numbers to indicate the position / the order of
> the services to start.
> 
> Where (for which runlevel) and at what position should I link the pg
> start/stop script?
> Why should one link it for more than one runlevel (I noticed this for
> apache)?
> 
> Thanks,
> 
> Markus
> 
> 


Daniel Fairs
[EMAIL PROTECTED], [EMAIL PROTECTED]
http://www.darkalley.co.uk, http://listen.to/agentorange

Just because you're not paranoid doesn't mean they're not out to get you.






Re: [SQL] BACK UP

2000-06-10 Thread Poul L. Christiansen

Use the command "pg_dumpall" to dump all databases to disk in SQL
format.

I don't know if there is any function for taking a backup of the work
done during the day.
We just dump all databases every day, to make a backup.

Poul L. Christiansen

GANESH KUMAR wrote:

> I WANT TO TAKE BACK UP DAILY WORK DONE
>
> WHAT IS PROCEDURE IS THERE ANY COMMMAND
>
> GANESH
>
> __
> Do You Yahoo!?
> Yahoo! Photos -- now, 100 FREE prints!
> http://photos.yahoo.com