自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

SET 中文man頁(yè)面

系統(tǒng)
SET 命令修改運(yùn)行時(shí)配置參數(shù)。許多在 Section 16.4 ``Run-time Configuration'' 里面列出的運(yùn)行時(shí)參數(shù)可以用 SET 在運(yùn)行時(shí)設(shè)置。 (但是有些要求使用超級(jí)用戶權(quán)限來(lái)修改,而其它有些則在服務(wù)器或者會(huì)話 開(kāi)始之后不能修改。)請(qǐng)注意 SET 只影響當(dāng)前會(huì)話使用的數(shù)值。

NAME

SET - 改變運(yùn)行時(shí)參數(shù)

SYNOPSIS

SET [ SESSION | LOCAL ] name { TO | = } { value | 'value' | DEFAULT }
SET [ SESSION | LOCAL ] TIME ZONE { timezone | LOCAL | DEFAULT }

DESCRIPTION 描述

SET 命令修改運(yùn)行時(shí)配置參數(shù)。許多在 Section 16.4 ``Run-time Configuration'' 里面列出的運(yùn)行時(shí)參數(shù)可以用 SET 在運(yùn)行時(shí)設(shè)置。 (但是有些要求使用超級(jí)用戶權(quán)限來(lái)修改,而其它有些則在服務(wù)器或者會(huì)話 開(kāi)始之后不能修改。)請(qǐng)注意 SET 只影響當(dāng)前會(huì)話使用的數(shù)值。


 如果 SET 或者 SET SESSION 是在一個(gè)稍后退出的事務(wù)里發(fā)出的, 那么 SET 命令的效果將在事務(wù)回滾的之后小時(shí)。 (這個(gè)行為和PostgreSQL版本 7.3 之前的不同, 那個(gè)時(shí)候 SET 的效果在后面的錯(cuò)誤之后不會(huì)回滾。) 一旦包圍它的事務(wù)提交,那么其效果將持續(xù)到事務(wù)的結(jié)束,除非被另外一個(gè) SET 覆蓋。

SET LOCAL 的效果只持續(xù)到當(dāng)前事務(wù)結(jié)束,不管是否提交。 一個(gè)特例是在一個(gè)事務(wù)里面的 SET 后面跟著一個(gè) SET LOCAL:在事務(wù)結(jié)束之前只能看到 SET LOCAL 的數(shù)值,但是之后(如果事務(wù)提交),則是 SET 的值生效。  

PARAMETERS 選項(xiàng)

SESSION

 聲明這個(gè)命令只對(duì)當(dāng)前會(huì)話起作用。 (如果 SESSION 或 LOCAL 都沒(méi)出現(xiàn),那么這個(gè)是缺省。)
LOCAL

 聲明該命令只在當(dāng)前事務(wù)中有效。在 COMMIT 或者 ROLLBACK 之后,會(huì)話級(jí)別的設(shè)置將再次生效。 請(qǐng)注意如果在 BEGIN 塊之外運(yùn)行,那么 SET LOCAL  將表現(xiàn)出沒(méi)有作用,因?yàn)槭聞?wù)將立即結(jié)束。
name

 可設(shè)置的運(yùn)行時(shí)參數(shù)的名字??捎玫膮?shù)在 Section 16.4 ``Run-time Configuration'' 和下面歸檔。
value

 參數(shù)的新值。值可以聲明為字串常量,標(biāo)識(shí)符,數(shù)字,或者逗號(hào)分隔的上面這些東西的列表。 DEFAULT 可以用于把這些參數(shù)設(shè)置為它們的缺省值。


 除了在 Section 16.4 ``Run-time Configuration'' 里面有文檔記載的配置參數(shù)之外, 還有幾個(gè)只能用 SET 命令設(shè)置,或者是有特殊的語(yǔ)法的參數(shù):

NAMES
SET NAMES value 是 SET client_encoding TO value 的別名。
SEED

 為隨機(jī)數(shù)生成器(函數(shù) random)設(shè)置內(nèi)部的種子。 允許的值是介于 0 和 1 之間的浮點(diǎn)數(shù),然后它會(huì)被乘以 231-1。


 我們也可以通過(guò)調(diào)用函數(shù) setseed 來(lái)設(shè)置種子:

SELECT setseed(value);

TIME ZONE
SET TIME ZONE value 是 for SET timezone TO value 的一個(gè)別名。 語(yǔ)法 SET TIME ZONE 允許為時(shí)區(qū)設(shè)置特殊的語(yǔ)法。 下面是有效值的例子:
'PST8PDT'

 加州伯克利的時(shí)區(qū)。
'Portugal'

 葡萄牙時(shí)區(qū)。
'Europe/Rome'

 意大利時(shí)區(qū)。
-7

 UTC 以西 7 小時(shí)的時(shí)區(qū)(等效于 PDT)。
INTERVAL '-08:00' HOUR TO MINUTE

 UTC 以西 8 小時(shí)的時(shí)區(qū)(等效于 PST)。
LOCAL
DEFAULT

 將時(shí)區(qū)設(shè)置為你的本地時(shí)區(qū)(服務(wù)器的操作系統(tǒng)缺省的那個(gè))。


 參閱 Section 8.5 ``Date/Time Types'' 獲取有關(guān)時(shí)區(qū)的更多細(xì)節(jié)。

NOTES 注意


 函數(shù) set_config 提供了等效的功能。 參閱 Section 9.13 ``Miscellaneous Functions'' 。  

EXAMPLES 例子


 設(shè)置模式搜索路徑:

SET search_path TO my_schema, public;

把日期時(shí)間風(fēng)格設(shè)置為傳統(tǒng)的 POSTGRES 風(fēng)格, with ``day before month'' input convention:

SET datestyle TO postgres, dmy;


 把時(shí)區(qū)設(shè)置為加州伯克力, 使用雙引號(hào)保存時(shí)區(qū)聲明里大寫(xiě)字符的屬性 (注意這里的日期/時(shí)間格式是 PostgreSQL):

SET TIME ZONE 'PST8PDT';
SELECT current_timestamp AS today;

             today
-------------------------------
 2003-04-29 15:02:01.218622-07

COMPATIBILITY 兼容性

SET TIME ZONE 擴(kuò)展了在 SQL 標(biāo)準(zhǔn)里定義的語(yǔ)法。 標(biāo)準(zhǔn)只允許有一個(gè)數(shù)字時(shí)區(qū)偏移, 而 PostgreSQL 還允許完整更靈活的時(shí)區(qū)聲明。 所有其它的 SET 特性都是 PostgreSQL 擴(kuò)展。  

SEE ALSO 參見(jiàn)

RESET [reset(7)], SHOW [show(l)]

#p#

NAME

SET - change a run-time parameter

SYNOPSIS

SET [ SESSION | LOCAL ] name { TO | = } { value | 'value' | DEFAULT }
SET [ SESSION | LOCAL ] TIME ZONE { timezone | LOCAL | DEFAULT }

DESCRIPTION

The SET command changes run-time configuration parameters. Many of the run-time parameters listed in the section called ``Run-time Configuration'' in the documentation can be changed on-the-fly with SET. (But some require superuser privileges to change, and others cannot be changed after server or session start.) SET only affects the value used by the current session.

If SET or SET SESSION is issued within a transaction that is later aborted, the effects of the SET command disappear when the transaction is rolled back. (This behavior represents a change from PostgreSQL versions prior to 7.3, where the effects of SET would not roll back after a later error.) Once the surrounding transaction is committed, the effects will persist until the end of the session, unless overridden by another SET.

The effects of SET LOCAL last only till the end of the current transaction, whether committed or not. A special case is SET followed by SET LOCAL within a single transaction: the SET LOCAL value will be seen until the end of the transaction, but afterwards (if the transaction is committed) the SET value will take effect.  

PARAMETERS

SESSION
Specifies that the command takes effect for the current session. (This is the default if neither SESSION nor LOCAL appears.)
LOCAL
Specifies that the command takes effect for only the current transaction. After COMMIT or ROLLBACK, the session-level setting takes effect again. Note that SET LOCAL will appear to have no effect if it is executed outside a BEGIN block, since the transaction will end immediately.
name
Name of a settable run-time parameter. Available parameters are documented in the section called ``Run-time Configuration'' in the documentation and below.
value
New value of parameter. Values can be specified as string constants, identifiers, numbers, or comma-separated lists of these. DEFAULT can be used to specify resetting the parameter to its default value.

Besides the configuration parameters documented in the section called ``Run-time Configuration'' in the documentation, there are a few that can only be adjusted using the SET command or that have a special syntax:

NAMES
SET NAMES value is an alias for SET client_encoding TO value.
SEED
Sets the internal seed for the random number generator (the function random). Allowed values are floating-point numbers between 0 and 1, which are then multiplied by 231-1.

The seed can also be set by invoking the function setseed:

SELECT setseed(value);

TIME ZONE
SET TIME ZONE value is an alias for SET timezone TO value. The syntax SET TIME ZONE allows special syntax for the time zone specification. Here are examples of valid values (but note some are accepted only on some platforms):
'PST8PDT'
The time zone for Berkeley, California.
'Portugal'
The time zone for Portugal.
'Europe/Rome'
The time zone for Italy.
-7
The time zone 7 hours west from UTC (equivalent to PDT). Positive values are east from UTC.
INTERVAL '-08:00' HOUR TO MINUTE
The time zone 8 hours west from UTC (equivalent to PST).
LOCAL
DEFAULT
Set the time zone to your local time zone (the one that the server's operating system defaults to).

See the section called ``Date/Time Types'' in the documentation for more information about time zones.

NOTES

The function set_config provides equivalent functionality. See the section called ``Miscellaneous Functions'' in the documentation.  

EXAMPLES

Set the schema search path:

SET search_path TO my_schema, public;

Set the style of date to traditional POSTGRES with ``day before month'' input convention:

SET datestyle TO postgres, dmy;

Set the time zone for Berkeley, California, using quotes to preserve the uppercase spelling of the time zone name:

SET TIME ZONE 'PST8PDT';
SELECT current_timestamp AS today;

             today
-------------------------------
 2003-04-29 15:02:01.218622-07

COMPATIBILITY

SET TIME ZONE extends syntax defined in the SQL standard. The standard allows only numeric time zone offsets while PostgreSQL allows more flexible time-zone specifications. All other SET features are PostgreSQL extensions.  

SEE ALSO

RESET [reset(7)], SHOW [show(l)]

責(zé)任編輯:韓亞珊 來(lái)源: CMPP.net
相關(guān)推薦

2011-08-24 17:53:08

SET CONSTRA中文man

2011-08-24 18:02:22

SET TRANSAC中文man

2011-08-24 17:58:08

SET SESSION中文man

2011-08-24 16:48:36

man中文man

2011-08-15 10:21:09

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-15 15:02:31

usleep中文man

2011-09-23 13:59:40

find中文man

2011-08-12 09:17:57

deallocvt中文man

2011-08-25 17:24:54

puts中文man

2011-07-15 16:58:36

ac中文man

2011-08-11 18:32:21

cp中文man

2011-08-23 11:34:26

ipcs中文man

2011-08-25 10:16:02

lmhosts中文man

2011-08-24 15:29:06

grant中文man

2011-08-25 17:32:40

setbuffer中文man

2011-08-25 16:50:08

getc中文man

2011-08-25 16:52:54

getchar中文man

2011-08-25 17:03:51

pclose中文man
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)