[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: [HACKERS] MS SQL Server compatibility functions
From:       Mario Weilguni <mweilguni () sime ! com>
Date:       2005-11-24 9:37:45
Message-ID: 200511241037.45172.mweilguni () sime ! com
[Download RAW message or body]

Am Mittwoch, 23. November 2005 16:32 schrieb Pollard, Mike:
> If this gets added as a contrib, here's a version of uniqueidentifier
> and newid() I wrote that maintains the same format as the SQL Server
> version:
>
> CREATE SCHEMA sqlserver
>   AUTHORIZATION postgres;
> GRANT ALL ON SCHEMA sqlserver TO public;
>
> CREATE SEQUENCE sqlserver.uniqueidentifier0
>   INCREMENT 1
>   MINVALUE 0
>   MAXVALUE 9223372036854775807
>   START 0
>   CACHE 1;
> GRANT ALL ON TABLE sqlserver.uniqueidentifier0 TO public;
>
> CREATE SEQUENCE sqlserver.uniqueidentifier1
>   INCREMENT 1
>   MINVALUE 0
>   MAXVALUE 9223372036854775807
>   START 0
>   CACHE 1;
> GRANT ALL ON TABLE sqlserver.uniqueidentifier1 TO public;

Why do you use "GRANT ALL" and not "GRANT SELECT, UPDATE"? All means everybody 
can do bad things with those sequences.

Regards,
	Mario Weilguni

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic