Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
10.6. SELECT Output Columns
Prev UpChapter 10. Type ConversionHome Next

10.6. SELECT Output Columns

The rules given in the preceding sections will result in assignment of non-unknown data types to all expressions in a SQL query, except for unspecified-type literals that appear as simple output columns of aSELECT command. For example, in

SELECT 'Hello World';

there is nothing to identify what type the string literal should be taken as. In this situationPostgres Pro will fall back to resolving the literal's type astext.

When theSELECT is one arm of aUNION (orINTERSECT orEXCEPT) construct, or when it appears withinINSERT ... SELECT, this rule is not applied since rules given in preceding sections take precedence. The type of an unspecified-type literal can be taken from the otherUNION arm in the first case, or from the destination column in the second case.

RETURNING lists are treated the same asSELECT output lists for this purpose.

Note

Prior toPostgres Pro 10, this rule did not exist, and unspecified-type literals in aSELECT output list were left as typeunknown. That had assorted bad consequences, so it's been changed.


Prev Up Next
10.5. UNION,CASE, and Related Constructs Home Chapter 11. Indexes
epubpdf
Go to Postgres Pro Standard 10
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp